Merge pull request #6587 from stenzek/macos-content-scale

DolphinWX: Scale window geometry before passing to backend
This commit is contained in:
Stenzek 2018-05-03 23:35:21 +10:00 committed by GitHub
commit 3270fadb0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -614,7 +614,13 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
m_log_window->Update(); m_log_window->Update();
if (g_renderer) 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(); event.Skip();
} }