mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-27 02:44:16 +08:00
fix a crash when pressing printscrn!
This commit is contained in:
parent
90cac09c12
commit
7be7f770bd
@ -22,7 +22,11 @@ void Steam_Overlay_Stats::update_frametime(const std::chrono::high_resolution_cl
|
|||||||
if (last_frametime_idx >= (settings->overlay_fps_avg_window - 1)) {
|
if (last_frametime_idx >= (settings->overlay_fps_avg_window - 1)) {
|
||||||
last_frametime_idx = 0;
|
last_frametime_idx = 0;
|
||||||
active_frametime_ms = static_cast<float>(running_frametime_ms) / settings->overlay_fps_avg_window;
|
active_frametime_ms = static_cast<float>(running_frametime_ms) / settings->overlay_fps_avg_window;
|
||||||
active_fps = static_cast<unsigned>((1000 * settings->overlay_fps_avg_window) / running_frametime_ms);
|
if (running_frametime_ms > 0) {
|
||||||
|
active_fps = static_cast<unsigned>((1000 * settings->overlay_fps_avg_window) / running_frametime_ms);
|
||||||
|
} else { // happens when avg window =1, no idea why!
|
||||||
|
active_fps = 999;
|
||||||
|
}
|
||||||
running_frametime_ms = 0;
|
running_frametime_ms = 0;
|
||||||
} else {
|
} else {
|
||||||
++last_frametime_idx;
|
++last_frametime_idx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user