mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 01:08:39 +12:00
Qt/windows: use Qt's high dpi scaling
This commit is contained in:
parent
9717e19be2
commit
79003cd089
2 changed files with 18 additions and 16 deletions
|
@ -252,20 +252,26 @@ void gs_frame::delete_context(draw_context_t ctx)
|
|||
|
||||
int gs_frame::client_width()
|
||||
{
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
return size().width();
|
||||
#else
|
||||
return size().width() * devicePixelRatio();
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
RECT rect;
|
||||
if (GetClientRect(HWND(winId()), &rect))
|
||||
{
|
||||
return rect.right - rect.left;
|
||||
}
|
||||
#endif // _WIN32
|
||||
return width() * devicePixelRatio();
|
||||
}
|
||||
|
||||
int gs_frame::client_height()
|
||||
{
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
return size().height();
|
||||
#else
|
||||
return size().height() * devicePixelRatio();
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
RECT rect;
|
||||
if (GetClientRect(HWND(winId()), &rect))
|
||||
{
|
||||
return rect.bottom - rect.top;
|
||||
}
|
||||
#endif // _WIN32
|
||||
return height() * devicePixelRatio();
|
||||
}
|
||||
|
||||
void gs_frame::flip(draw_context_t, bool /*skip_frame*/)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue