diff options
author | san <sander.smid@gmail.com> | 2021-07-21 20:56:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-21 20:56:42 +0200 |
commit | 583a10fdedae0c1f2a787d8dffe98959afb725b5 (patch) | |
tree | 96380c8f056cede7434537d92717d204b141ca4c /src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |
parent | Merge pull request #6660 from Morph1984/controller_applet_rev8 (diff) | |
download | yuzu-583a10fdedae0c1f2a787d8dffe98959afb725b5.tar yuzu-583a10fdedae0c1f2a787d8dffe98959afb725b5.tar.gz yuzu-583a10fdedae0c1f2a787d8dffe98959afb725b5.tar.bz2 yuzu-583a10fdedae0c1f2a787d8dffe98959afb725b5.tar.lz yuzu-583a10fdedae0c1f2a787d8dffe98959afb725b5.tar.xz yuzu-583a10fdedae0c1f2a787d8dffe98959afb725b5.tar.zst yuzu-583a10fdedae0c1f2a787d8dffe98959afb725b5.zip |
Diffstat (limited to 'src/yuzu_cmd/emu_window/emu_window_sdl2.cpp')
-rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 896181f0b..8dfc09393 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp @@ -122,12 +122,6 @@ void EmuWindow_SDL2::OnResize() { } void EmuWindow_SDL2::Fullscreen() { - if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN) == 0) { - return; - } - - LOG_ERROR(Frontend, "Fullscreening failed: {}", SDL_GetError()); - // Try a different fullscreening method LOG_INFO(Frontend, "Attempting to use borderless fullscreen..."); if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN_DESKTOP) == 0) { @@ -136,6 +130,12 @@ void EmuWindow_SDL2::Fullscreen() { LOG_ERROR(Frontend, "Borderless fullscreening failed: {}", SDL_GetError()); + if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN) == 0) { + return; + } + + LOG_ERROR(Frontend, "Fullscreening failed: {}", SDL_GetError()); + // Fallback algorithm: Maximise window. // Works on all systems (unless something is seriously wrong), so no fallback for this one. LOG_INFO(Frontend, "Falling back on a maximised window..."); |