mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Add clamping at 99999 to the FPS counter (#932)
This commit is contained in:
parent
e74ea05fde
commit
c0e03a2ca9
1 changed files with 1 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ struct DjuiFpsDisplay *sFpsDisplay = NULL;
|
||||||
void djui_fps_display_update(u16 fps) {
|
void djui_fps_display_update(u16 fps) {
|
||||||
if (configShowFPS && sFpsDisplay != NULL) {
|
if (configShowFPS && sFpsDisplay != NULL) {
|
||||||
char fpsText[30] = "";
|
char fpsText[30] = "";
|
||||||
|
fps = fps > 99999 ? 99999 : fps; // Prevent overflowing the FPS display (cap at 99999)
|
||||||
snprintf(fpsText, 30, "\\#dcdcdc\\FPS: \\#ffffff\\%d", fps);
|
snprintf(fpsText, 30, "\\#dcdcdc\\FPS: \\#ffffff\\%d", fps);
|
||||||
djui_text_set_text(sFpsDisplay->text, fpsText);
|
djui_text_set_text(sFpsDisplay->text, fpsText);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue