mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
(Android) Workaround for an SDL issue where SDL_PollEvent() consumes all available CPU cycles when the application has been stopped
This commit is contained in:
parent
26ad7b9a7e
commit
45d885e2a9
|
@ -494,6 +494,14 @@ void applicationLoop()
|
|||
#if !defined(__EMSCRIPTEN__)
|
||||
while (true) {
|
||||
#endif
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
// Workaround for an SDL issue where SDL_PollEvent() consumes all available CPU
|
||||
// cycles when the application has been stopped.
|
||||
while (AndroidVariables::sPaused)
|
||||
SDL_Delay(10);
|
||||
#endif
|
||||
|
||||
if (SDL_PollEvent(&event)) {
|
||||
do {
|
||||
InputManager::getInstance().parseEvent(event);
|
||||
|
|
Loading…
Reference in a new issue