mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
a163c90f2b
commit
437b6f3f0e
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue