MCPcopy Create free account
hub / github.com/RetroAchievements/RALibretro / toggleFullscreen

Method toggleFullscreen

src/Application.cpp:2306–2322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2304}
2305
2306void Application::toggleFullscreen()
2307{
2308 Uint32 fullscreen = SDL_GetWindowFlags(_window) & SDL_WINDOW_FULLSCREEN_DESKTOP;
2309 if (fullscreen)
2310 {
2311 SetMenu(g_mainWindow, _menu);
2312 SDL_ShowCursor(SDL_ENABLE);
2313 }
2314
2315 SDL_SetWindowFullscreen(_window, fullscreen ^ SDL_WINDOW_FULLSCREEN_DESKTOP);
2316
2317 if (!fullscreen)
2318 {
2319 SetMenu(g_mainWindow, NULL);
2320 SDL_ShowCursor(SDL_DISABLE);
2321 }
2322}
2323
2324void Application::handle(const SDL_SysWMEvent* syswm)
2325{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected