mirror of https://github.com/libsdl-org/SDL.git
testmessage: Don't push the event if "Retry" was chosen.
Otherwise, the message box thread goes back to blocking, but the app's main thread progresses to SDL_WaitThread and won't pump the event queue anymore. On iOS, this means the messagebox won't pop back up (because it uses SDL_RunOnMainThread, which needs the event loop to pump), but it's just bad practice on any platform to stop pumping the event queue for indefinite lengths of time.
This commit is contained in:
parent
d73fe0bc53
commit
795d1ae1fb
|
|
@ -98,15 +98,16 @@ static int SDLCALL button_messagebox(void *eventNumber)
|
||||||
}
|
}
|
||||||
SDL_Log("Pressed button: %d, %s", button, button == -1 ? "[closed]" : text);
|
SDL_Log("Pressed button: %d, %s", button, button == -1 ? "[closed]" : text);
|
||||||
|
|
||||||
|
if (button == 2) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (eventNumber) {
|
if (eventNumber) {
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
event.type = (Uint32)(intptr_t)eventNumber;
|
event.type = (Uint32)(intptr_t)eventNumber;
|
||||||
SDL_PushEvent(&event);
|
SDL_PushEvent(&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (button == 2) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue