[Commits] SDL: Fixed infinite timeout in SDL_WaitEventTimeout() - thanks К...

libsdl.org revision control commits-owner at libsdl.org
Tue Mar 8 14:03:37 PST 2016


details:   https://hg.libsdl.org/SDL/rev/d240baef8248
changeset: 10106:d240baef8248
user:      Sam Lantinga <slouken at libsdl.org>
date:      Tue Mar 08 13:55:50 2016 -0800
description:
Fixed infinite timeout in SDL_WaitEventTimeout() - thanks Константин Гончарик

diffstat:

 src/events/SDL_events.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r c59a7e780093 -r d240baef8248 src/events/SDL_events.c
--- a/src/events/SDL_events.c	Mon Mar 07 08:22:55 2016 -0500
+++ b/src/events/SDL_events.c	Tue Mar 08 13:55:50 2016 -0800
@@ -435,8 +435,6 @@
         switch (SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT)) {
         case -1:
             return 0;
-        case 1:
-            return 1;
         case 0:
             if (timeout == 0) {
                 /* Polling and no events, just return */
@@ -448,6 +446,9 @@
             }
             SDL_Delay(10);
             break;
+        default:
+            /* Has events */
+            return 1;
         }
     }
 }


More information about the commits mailing list