From 019a2dffae411982e7149433f1f3929525836f91 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Thu, 14 Apr 2022 04:39:10 +0200 Subject: [PATCH] early-access version 2676 --- README.md | 2 +- src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 568aec5e6..66ee39cee 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2675. +This is the source code for early-access 2676. ## Legal Notice diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 57f807826..ae2e62dc5 100755 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp @@ -123,14 +123,15 @@ void EmuWindow_SDL2::ShowCursor(bool show_cursor) { } void EmuWindow_SDL2::Fullscreen() { + SDL_DisplayMode display_mode; switch (Settings::values.fullscreen_mode.GetValue()) { case Settings::FullscreenMode::Exclusive: - // Set window size to render size before entering fullscreen -- SDL does not resize to - // display dimensions in this mode. - // TODO: Multiply the window size by resolution_factor (for both docked modes) - if (Settings::values.use_docked_mode) { - SDL_SetWindowSize(render_window, Layout::ScreenDocked::Width, - Layout::ScreenDocked::Height); + // Set window size to render size before entering fullscreen -- SDL2 does not resize window + // to display dimensions automatically in this mode. + if (SDL_GetDesktopDisplayMode(0, &display_mode) == 0) { + SDL_SetWindowSize(render_window, display_mode.w, display_mode.h); + } else { + LOG_ERROR(Frontend, "SDL_GetDesktopDisplayMode failed: {}", SDL_GetError()); } if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN) == 0) {