(GX) fix FPS reporting
This commit is contained in:
parent
c9928a0b8a
commit
cd8269abd4
|
@ -943,14 +943,15 @@ static bool gx_frame(void *data, const void *frame,
|
||||||
GX_DrawDone();
|
GX_DrawDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char fps_txt[128];
|
||||||
|
gfx_get_fps(fps_txt, sizeof(fps_txt), lifecycle_mode_state & (1ULL << MODE_FPS_DRAW) ? true : false);
|
||||||
|
|
||||||
if (lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))
|
if (lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))
|
||||||
{
|
{
|
||||||
char fps_txt[128];
|
|
||||||
char mem1_txt[128];
|
char mem1_txt[128];
|
||||||
unsigned x = 15;
|
unsigned x = 15;
|
||||||
unsigned y = 35;
|
unsigned y = 35;
|
||||||
|
|
||||||
gfx_get_fps(fps_txt, sizeof(fps_txt), true);
|
|
||||||
gx_blit_line(x, y, fps_txt);
|
gx_blit_line(x, y, fps_txt);
|
||||||
y += FONT_HEIGHT * (gx->double_strike ? 1 : 2);
|
y += FONT_HEIGHT * (gx->double_strike ? 1 : 2);
|
||||||
snprintf(mem1_txt, sizeof(mem1_txt), "MEM1: %8d / %8d", SYSMEM1_SIZE - SYS_GetArena1Size(), SYSMEM1_SIZE);
|
snprintf(mem1_txt, sizeof(mem1_txt), "MEM1: %8d / %8d", SYSMEM1_SIZE - SYS_GetArena1Size(), SYSMEM1_SIZE);
|
||||||
|
@ -971,9 +972,6 @@ static bool gx_frame(void *data, const void *frame,
|
||||||
clear_efb = GX_TRUE;
|
clear_efb = GX_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
char buf[128];
|
|
||||||
gfx_get_fps(buf, sizeof(buf), false);
|
|
||||||
|
|
||||||
GX_CopyDisp(g_framebuf[g_current_framebuf], clear_efb);
|
GX_CopyDisp(g_framebuf[g_current_framebuf], clear_efb);
|
||||||
GX_Flush();
|
GX_Flush();
|
||||||
VIDEO_SetNextFramebuffer(g_framebuf[g_current_framebuf]);
|
VIDEO_SetNextFramebuffer(g_framebuf[g_current_framebuf]);
|
||||||
|
|
Loading…
Reference in New Issue