mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
Qt: add option to automatically resize the game window
This commit is contained in:
parent
2eef3ab645
commit
8199f97e7a
4 changed files with 35 additions and 6 deletions
|
@ -281,8 +281,17 @@ std::unique_ptr<gs_frame> gui_application::get_gs_frame()
|
|||
|
||||
if (m_gui_settings->GetValue(gui::gs_resize).toBool())
|
||||
{
|
||||
w = m_gui_settings->GetValue(gui::gs_width).toInt();
|
||||
h = m_gui_settings->GetValue(gui::gs_height).toInt();
|
||||
if (m_gui_settings->GetValue(gui::gs_resize_manual).toBool())
|
||||
{
|
||||
w = m_gui_settings->GetValue(gui::gs_width).toInt();
|
||||
h = m_gui_settings->GetValue(gui::gs_height).toInt();
|
||||
}
|
||||
else
|
||||
{
|
||||
const qreal device_pixel_ratio = devicePixelRatio();
|
||||
w /= device_pixel_ratio;
|
||||
h /= device_pixel_ratio;
|
||||
}
|
||||
}
|
||||
|
||||
const auto screen = m_main_window ? m_main_window->screen() : primaryScreen();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue