alt_return to toggle fullscreen (#252)

* alt_return to toggle fullscreen

* more
This commit is contained in:
Logan McNaughton
2025-02-14 12:29:49 +01:00
committed by GitHub
parent df9ad377d3
commit b7d194e12d
2 changed files with 27 additions and 5 deletions
+8 -1
View File
@@ -141,10 +141,17 @@ bool sdl_event_filter(void *userdata, SDL_Event *event)
{
wsi_platform->do_resize();
}
else if (event->type == SDL_EVENT_KEY_DOWN)
else if (event->type == SDL_EVENT_KEY_UP)
{
switch (event->key.scancode)
{
case SDL_SCANCODE_RETURN:
if (event->key.mod & SDL_KMOD_ALT)
{
fullscreen = !fullscreen;
SDL_SetWindowFullscreen(window, fullscreen);
}
break;
case SDL_SCANCODE_ESCAPE:
if (fullscreen)
callback.emu_running = false;