mirror of https://github.com/PCSX2/pcsx2.git
Qt: Fix Big Picture UI locking up after game list switch
This commit is contained in:
parent
c62bd4ce97
commit
66b779a77d
|
@ -537,10 +537,6 @@ void EmuThread::setSurfaceless(bool surfaceless)
|
|||
if (!MTGS::IsOpen() || m_is_surfaceless == surfaceless)
|
||||
return;
|
||||
|
||||
// If we went surfaceless and were running the fullscreen UI, stop MTGS running idle.
|
||||
// Otherwise, we'll keep trying to present to nothing.
|
||||
MTGS::SetRunIdle(!surfaceless && m_run_fullscreen_ui);
|
||||
|
||||
// This will call back to us on the MTGS thread.
|
||||
m_is_surfaceless = surfaceless;
|
||||
MTGS::UpdateDisplayWindow();
|
||||
|
|
|
@ -508,6 +508,12 @@ void GSGameChanged()
|
|||
GSTextureReplacements::GameChanged();
|
||||
}
|
||||
|
||||
bool GSHasDisplayWindow()
|
||||
{
|
||||
pxAssert(g_gs_device);
|
||||
return (g_gs_device->GetWindowInfo().type != WindowInfo::Type::Surfaceless);
|
||||
}
|
||||
|
||||
void GSResizeDisplayWindow(int width, int height, float scale)
|
||||
{
|
||||
g_gs_device->ResizeWindow(width, height, scale);
|
||||
|
|
|
@ -96,6 +96,7 @@ void GSPresentCurrentFrame();
|
|||
void GSThrottlePresentation();
|
||||
void GSGameChanged();
|
||||
void GSSetDisplayAlignment(GSDisplayAlignment alignment);
|
||||
bool GSHasDisplayWindow();
|
||||
void GSResizeDisplayWindow(int width, int height, float scale);
|
||||
void GSUpdateDisplayWindow();
|
||||
void GSSetVSyncMode(VsyncMode mode);
|
||||
|
|
|
@ -324,7 +324,7 @@ void MTGS::MainLoop()
|
|||
|
||||
while (true)
|
||||
{
|
||||
if (s_run_idle_flag.load(std::memory_order_acquire) && VMManager::GetState() != VMState::Running)
|
||||
if (s_run_idle_flag.load(std::memory_order_acquire) && VMManager::GetState() != VMState::Running && GSHasDisplayWindow())
|
||||
{
|
||||
if (!s_sem_event.CheckForWork())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue