mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-23 15:20:59 +00:00
Fixed infinite timeout in SDL_WaitEventTimeout() - thanks ?????????? ????????
This commit is contained in:
parent
2a754ca735
commit
6303941ac1
|
@ -435,8 +435,6 @@ SDL_WaitEventTimeout(SDL_Event * event, int timeout)
|
||||||
switch (SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT)) {
|
switch (SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT)) {
|
||||||
case -1:
|
case -1:
|
||||||
return 0;
|
return 0;
|
||||||
case 1:
|
|
||||||
return 1;
|
|
||||||
case 0:
|
case 0:
|
||||||
if (timeout == 0) {
|
if (timeout == 0) {
|
||||||
/* Polling and no events, just return */
|
/* Polling and no events, just return */
|
||||||
|
@ -448,6 +446,9 @@ SDL_WaitEventTimeout(SDL_Event * event, int timeout)
|
||||||
}
|
}
|
||||||
SDL_Delay(10);
|
SDL_Delay(10);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
/* Has events */
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue