From aac0e07d1ea1e068265955ee7e0287a80f5a1235 Mon Sep 17 00:00:00 2001
From: Alexander Orzechowski <alex@ozal.ski>
Date: Mon, 3 Apr 2023 14:34:45 +0300
Subject: [PATCH] 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/citra/emu_window/emu_window_sdl2.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp
index c7d2513b5..f8fe7135d 100644
--- a/src/citra/emu_window/emu_window_sdl2.cpp
+++ b/src/citra/emu_window/emu_window_sdl2.cpp
@@ -84,7 +84,7 @@ void EmuWindow_SDL2::RequestClose() {
 
 void EmuWindow_SDL2::OnResize() {
     int width, height;
-    SDL_GetWindowSize(render_window, &width, &height);
+    SDL_GL_GetDrawableSize(render_window, &width, &height);
     UpdateCurrentFramebufferLayout(width, height);
 }