mirror of https://github.com/PCSX2/pcsx2.git
ImGuiManager: Avoid invalid scale update on surfaceless
This commit is contained in:
parent
f909282973
commit
d53b2ae104
|
@ -425,8 +425,8 @@ bool ImGuiFullscreen::UpdateLayoutScale()
|
|||
static constexpr float LAYOUT_RATIO = LAYOUT_SCREEN_WIDTH / LAYOUT_SCREEN_HEIGHT;
|
||||
const ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
const float screen_width = io.DisplaySize.x;
|
||||
const float screen_height = io.DisplaySize.y;
|
||||
const float screen_width = std::max(io.DisplaySize.x, 1.0f);
|
||||
const float screen_height = std::max(io.DisplaySize.y, 1.0f);
|
||||
const float screen_ratio = screen_width / screen_height;
|
||||
const float old_scale = g_layout_scale;
|
||||
|
||||
|
|
|
@ -235,7 +235,8 @@ void ImGuiManager::WindowResized()
|
|||
|
||||
void ImGuiManager::RequestScaleUpdate()
|
||||
{
|
||||
s_scale_changed = true;
|
||||
if (s_window_width > 0 && s_window_height > 0)
|
||||
s_scale_changed = true;
|
||||
}
|
||||
|
||||
void ImGuiManager::UpdateScale()
|
||||
|
|
Loading…
Reference in New Issue