Skip to content
Permalink
Browse files
Merge pull request #6587 from stenzek/macos-content-scale
DolphinWX: Scale window geometry before passing to backend
  • Loading branch information
stenzek committed May 3, 2018
2 parents be32602 + 210a6a3 commit 3270fad
Showing 1 changed file with 7 additions and 1 deletion.
@@ -614,7 +614,13 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
m_log_window->Update();

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));
}
}
event.Skip();
}

0 comments on commit 3270fad

Please sign in to comment.