mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-11-17 03:14:44 +01:00
overlays: avoid division by zero
This commit is contained in:
1 parent
fb96047d2f
commit
a17a5a76a0
1 file changed
+1
-1
@@ -383,7 +383,7 @@ namespace rsx
|
||||
|
||||
rsx_cycles += rsx_thread->get_cycles();
|
||||
|
||||
total_cycles = ppu_cycles + spu_cycles + rsx_cycles;
|
||||
total_cycles = std::max<u64>(1, ppu_cycles + spu_cycles + rsx_cycles);
|
||||
cpu_usage = m_cpu_stats.get_usage();
|
||||
|
||||
ppu_usage = std::clamp(cpu_usage * ppu_cycles / total_cycles, 0.f, 100.f);
|
||||
|
||||
Reference in new issue
Block a user