Browse files

DolphinWX: Scale window geometry before passing to backend

In macOS, the window size is device-independent points, which may not
match the content/backing framebuffer size.
  • Loading branch information...
stenzek committed Apr 2, 2018
1 parent 467379c commit 210a6a37b4e0dcba634f4d0d1630ffd345932cfd
Showing with 7 additions and 1 deletion.
  1. +7 −1 Source/Core/DolphinWX/FrameTools.cpp
@@ -614,7 +614,13 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
if (g_renderer)
g_renderer->ResizeSurface(width, height);
// The window geometry is in device-independent points and may not match the content or
// framebuffer size in macOS. Multiply by the content scaling factor to get the real size.
double scaling_factor = m_render_frame->GetContentScaleFactor();
g_renderer->ResizeSurface(static_cast<int>(width * scaling_factor),
static_cast<int>(height * scaling_factor));

0 comments on commit 210a6a3

Please sign in to comment.