diff src/dmsimple.c @ 850:62ee4e590a15

Simplify a bit.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 21 Oct 2014 20:21:23 +0300
parents 30f9af5e80f2
children 15b413845e24
line wrap: on
line diff
--- a/src/dmsimple.c	Tue Oct 21 20:10:27 2014 +0300
+++ b/src/dmsimple.c	Tue Oct 21 20:21:23 2014 +0300
@@ -476,7 +476,7 @@
 
         // Draw frame
         engine.frameTime = SDL_GetTicks();
-        if (SDL_MUSTLOCK(engine.screen) != 0 && SDL_LockSurface(engine.screen) != 0)
+        if (SDL_MUSTLOCK(engine.screen) && SDL_LockSurface(engine.screen) != 0)
         {
             dmError("Can't lock surface.\n");
             goto out;
@@ -542,7 +542,7 @@
             menuStr);
 
         // Flip screen
-        if (SDL_MUSTLOCK(engine.screen) != 0)
+        if (SDL_MUSTLOCK(engine.screen))
             SDL_UnlockSurface(engine.screen);
 
         SDL_Flip(engine.screen);
@@ -828,7 +828,7 @@
             engine.startTime = engine.frameTime - engine.pauseTime;
         }
 
-        if (SDL_MUSTLOCK(engine.screen) != 0 && SDL_LockSurface(engine.screen) != 0)
+        if (SDL_MUSTLOCK(engine.screen) && SDL_LockSurface(engine.screen) != 0)
         {
             dmError("Can't lock surface.\n");
             goto error_exit;
@@ -849,7 +849,7 @@
 #endif
 
         // Flip screen
-        if (SDL_MUSTLOCK(engine.screen) != 0)
+        if (SDL_MUSTLOCK(engine.screen))
             SDL_UnlockSurface(engine.screen);
 
         SDL_Flip(engine.screen);