mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-03-06 14:27:44 +00:00
System: Fix invalid memory read in SW thread stats
This commit is contained in:
parent
5ad268f449
commit
6b8b08ef61
|
@ -2153,7 +2153,7 @@ void System::ResetPerformanceCounters()
|
||||||
s_last_global_tick_counter = TimingEvents::GetGlobalTickCounter();
|
s_last_global_tick_counter = TimingEvents::GetGlobalTickCounter();
|
||||||
s_last_cpu_time = s_cpu_thread_handle.GetCPUTime();
|
s_last_cpu_time = s_cpu_thread_handle.GetCPUTime();
|
||||||
s_last_sw_time = 0;
|
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();
|
const Threading::Thread* sw_thread = static_cast<GPU_SW*>(g_gpu.get())->GetBackend().GetThread();
|
||||||
if (sw_thread)
|
if (sw_thread)
|
||||||
|
@ -4211,4 +4211,4 @@ void System::SetTimerResolutionIncreased(bool enabled)
|
||||||
else
|
else
|
||||||
timeEndPeriod(1);
|
timeEndPeriod(1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue