From 50afd83bc675a91071865271a93d66bbb42ccf74 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Thu, 6 Jan 2022 17:00:00 -0600 Subject: [PATCH] GUI: Fix scale factor on macOS --- pcsx2/gui/FrameForGS.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pcsx2/gui/FrameForGS.cpp b/pcsx2/gui/FrameForGS.cpp index 545c5c7696..65894380fc 100644 --- a/pcsx2/gui/FrameForGS.cpp +++ b/pcsx2/gui/FrameForGS.cpp @@ -340,6 +340,8 @@ std::optional GSPanel::GetWindowInfo() #endif // GTK_MAJOR_VERSION >= 3 #elif defined(__WXOSX__) ret.type = WindowInfo::Type::MacOS; + ret.surface_width = static_cast(ret.surface_width * ret.surface_scale); + ret.surface_height = static_cast(ret.surface_height * ret.surface_scale); ret.window_handle = GetHandle(); #endif @@ -365,13 +367,18 @@ void GSPanel::OnResize(wxEvent& event) int width = gs_vp_size.GetWidth(); int height = gs_vp_size.GetHeight(); + if (false #ifdef __WXGTK__ - if (g_gs_window_info.type == WindowInfo::Type::X11) + || g_gs_window_info.type == WindowInfo::Type::X11 +#endif +#ifdef __APPLE__ + || g_gs_window_info.type == WindowInfo::Type::MacOS +#endif + ) { width = static_cast(width * scale); height = static_cast(height * scale); } -#endif g_gs_window_info.surface_width = width; g_gs_window_info.surface_height = height;