mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-16 19:14:18 +01:00
Host: Reset imgui state when there's no frame to present
Prevents things getting into a messed up state internally where several frames are buffered.
This commit is contained in:
1 parent
a163c90f2b
commit
437b6f3f0e
2 files changed
+19
-2
No files matched your search
@@ -716,7 +716,15 @@ void Host::ReleaseHostDisplay()
|
||||
|
||||
bool Host::BeginPresentFrame(bool frame_skip)
|
||||
{
|
||||
return s_host_display->BeginPresent(frame_skip);
|
||||
if (!s_host_display->BeginPresent(frame_skip))
|
||||
{
|
||||
// if we're skipping a frame, we need to reset imgui's state, since
|
||||
// we won't be calling EndPresentFrame().
|
||||
ImGuiManager::NewFrame();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Host::EndPresentFrame()
|
||||
|
||||
+10
-1
@@ -153,7 +153,16 @@ HostDisplay* Host::GetHostDisplay()
|
||||
bool Host::BeginPresentFrame(bool frame_skip)
|
||||
{
|
||||
CheckForGSWindowResize();
|
||||
return s_host_display->BeginPresent(frame_skip);
|
||||
|
||||
if (!s_host_display->BeginPresent(frame_skip))
|
||||
{
|
||||
// if we're skipping a frame, we need to reset imgui's state, since
|
||||
// we won't be calling EndPresentFrame().
|
||||
ImGuiManager::NewFrame();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Host::EndPresentFrame()
|
||||
|
||||
Reference in new issue
Block a user