Merge pull request #605 from SolidStateDj/add-toggle-fullscreen
Some checks are pending
Reuse / reuse (push) Waiting to run
Clang Format / clang-format (push) Waiting to run
Linux-Qt / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS-Qt / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows-Qt / build (push) Waiting to run
Windows / build (push) Waiting to run

Add a toggle fullscreen button
This commit is contained in:
georgemoralis 2024-08-28 06:32:21 +03:00 committed by GitHub
commit e4254ebdaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -273,6 +273,15 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
case SDLK_SPACE:
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_TOUCH_PAD;
break;
case SDLK_F11:
if (event->type == SDL_EVENT_KEY_DOWN) {
{
SDL_WindowFlags flag = SDL_GetWindowFlags(window);
bool is_fullscreen = flag & SDL_WINDOW_FULLSCREEN;
SDL_SetWindowFullscreen(window, !is_fullscreen);
}
}
break;
default:
break;
}