From 5754456292e920810e3b036b851c05c5332353ce Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Sun, 20 Nov 2022 17:46:53 -0500 Subject: emu_window_sdl2: Respect hidpi Use SDL_GL_GetDrawableSize instead of SDL_GetWindowSize which will return the true size our swapchain needs to be in even for hidpi displays. --- src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 37dd1747c..31f28a507 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp @@ -115,7 +115,7 @@ bool EmuWindow_SDL2::IsShown() const { void EmuWindow_SDL2::OnResize() { int width, height; - SDL_GetWindowSize(render_window, &width, &height); + SDL_GL_GetDrawableSize(render_window, &width, &height); UpdateCurrentFramebufferLayout(width, height); } -- cgit v1.2.3 From 09e3029c1118616394e5e9c45dfcdd4adcdf86ad Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Tue, 13 Dec 2022 14:39:03 -0500 Subject: gl_device: Use a more robust way to use strict context mode Instead of checking a environment variable which may not actually exist or is just wrong, ask QT if it's running on the wayland platform. --- src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp index 9b660c13c..ddcb048d6 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp @@ -104,6 +104,8 @@ EmuWindow_SDL2_GL::EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsyste exit(1); } + strict_context_required = strcmp(SDL_GetCurrentVideoDriver(), "wayland") == 0; + SetWindowIcon(); if (fullscreen) { -- cgit v1.2.3