Skip to content

Commit

Permalink
gui: dd: Properly draw >99 fps
Browse files Browse the repository at this point in the history
  • Loading branch information
Electry committed Nov 2, 2019
1 parent 5769776 commit 18d5fd3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,11 @@ static void _psvs_gui_dd_prchar(const char character, int x, int y) {
}

void psvs_gui_dd_fps() {
char buf[3] = "";
snprintf(buf, 3, "%d", psvs_perf_get_fps());
char buf[4] = "";
snprintf(buf, 4, "%d", psvs_perf_get_fps());
size_t len = strlen(buf);

for (int i = 0; i < 2; i++) {
for (int i = 0; i < len; i++) {
_psvs_gui_dd_prchar(buf[i], 10 + i * g_gui_font_width * g_gui_font_scale, 10);
}
}
Expand Down

0 comments on commit 18d5fd3

Please sign in to comment.