mirror of
https://github.com/gopher64/gopher64.git
synced 2026-10-31 03:26:52 +01:00
pause on minimize to prevent memory leak (#1197)
This commit is contained in:
1 parent
42c44998ff
commit
2840667c78
1 file changed
+4
@@ -157,6 +157,10 @@ bool sdl_event_filter(void *userdata, SDL_Event *event) {
|
||||
callback.emu_running = false;
|
||||
} else if (event->type == SDL_EVENT_WINDOW_RESIZED && callback.emu_running) {
|
||||
wsi_platform->do_resize();
|
||||
} else if (event->type == SDL_EVENT_WINDOW_MINIMIZED) {
|
||||
callback.paused = true;
|
||||
} else if (event->type == SDL_EVENT_WINDOW_RESTORED) {
|
||||
callback.paused = false;
|
||||
} else if (event->type == SDL_EVENT_KEY_DOWN && !event->key.repeat) {
|
||||
SDL_Event user_event;
|
||||
switch (event->key.scancode) {
|
||||
|
||||
Reference in new issue
Block a user