GPUThread: Fix crash during FSUI language switch

This commit is contained in:
Stenzek 2025-01-31 13:47:25 +10:00
parent 96058f5d7e
commit 03181d1179
No known key found for this signature in database
1 changed files with 7 additions and 0 deletions

View File

@ -537,6 +537,13 @@ void GPUThread::Internal::GPUThreadEntryPoint()
void GPUThread::Internal::DoRunIdle()
{
if (!g_gpu_device->HasMainSwapChain()) [[unlikely]]
{
// only happens during language switch
Timer::NanoSleep(16 * 1000 * 1000);
return;
}
if (!PresentFrameAndRestoreContext())
return;