System: Fix invalid memory read in SW thread stats

This commit is contained in:
Connor McLaughlin 2022-07-28 00:02:17 +10:00
parent 560df7e06d
commit d4ae1673e0
1 changed files with 2 additions and 2 deletions

View File

@ -2153,7 +2153,7 @@ void System::ResetPerformanceCounters()
s_last_global_tick_counter = TimingEvents::GetGlobalTickCounter();
s_last_cpu_time = s_cpu_thread_handle.GetCPUTime();
s_last_sw_time = 0;
if (g_gpu->IsHardwareRenderer())
if (!g_gpu->IsHardwareRenderer())
{
const Threading::Thread* sw_thread = static_cast<GPU_SW*>(g_gpu.get())->GetBackend().GetThread();
if (sw_thread)
@ -4211,4 +4211,4 @@ void System::SetTimerResolutionIncreased(bool enabled)
else
timeEndPeriod(1);
#endif
}
}