Added in game fullscreen toggling (#358)

This commit is contained in:
Steven 2025-06-21 14:09:33 +00:00 committed by GitHub
parent 922794e7ea
commit ed71ac8ec2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -433,8 +433,14 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
}
SDL_Keycode keyCode = event->key.key;
if (InputManager()) {
InputManager()->QueueEvent(c_notificationKeyPress, keyCode, 0, 0, keyCode);
if (event->key.mod == SDL_KMOD_LALT && keyCode == SDLK_RETURN) {
SDL_SetWindowFullscreen(window, !(SDL_GetWindowFlags(window) & SDL_WINDOW_FULLSCREEN));
}
else {
if (InputManager()) {
InputManager()->QueueEvent(c_notificationKeyPress, keyCode, 0, 0, keyCode);
}
}
break;
}