Skip to content

Commit

Permalink
GUI: Fix scale factor on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
TellowKrinkle committed Feb 2, 2022
1 parent 85934dc commit 50afd83
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pcsx2/gui/FrameForGS.cpp
Expand Up @@ -340,6 +340,8 @@ std::optional<WindowInfo> GSPanel::GetWindowInfo()
#endif // GTK_MAJOR_VERSION >= 3
#elif defined(__WXOSX__)
ret.type = WindowInfo::Type::MacOS;
ret.surface_width = static_cast<u32>(ret.surface_width * ret.surface_scale);
ret.surface_height = static_cast<u32>(ret.surface_height * ret.surface_scale);
ret.window_handle = GetHandle();
#endif

Expand All @@ -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<int>(width * scale);
height = static_cast<int>(height * scale);
}
#endif

g_gs_window_info.surface_width = width;
g_gs_window_info.surface_height = height;
Expand Down

0 comments on commit 50afd83

Please sign in to comment.