Browse Source

SDLTest_CommonEvent: only set done when it is finished

Anonymous Maarten 1 year ago
parent
commit
c8372e20d6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/test/SDL_test_common.c

+ 3 - 1
src/test/SDL_test_common.c

@@ -2429,7 +2429,9 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
 
 void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
 {
-    *done = SDLTest_CommonEventMainCallbacks(state, event) ? 1 : 0;
+    if (SDLTest_CommonEventMainCallbacks(state, event)) {
+        *done = 1;
+    }
 }
 
 void SDLTest_CommonQuit(SDLTest_CommonState *state)