mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-13 13:28:49 +00:00
(XDK) Move FPS printing code over to window_update_title function
as well
This commit is contained in:
parent
53df912321
commit
c84750a752
@ -196,14 +196,12 @@ static void gfx_ctx_update_window_title(void)
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW) &&
|
||||
gl->font_ctx)
|
||||
{
|
||||
#ifdef HAVE_LIBDBGFONT
|
||||
font_params_t params = {0};
|
||||
params.x = g_settings.video.msg_pos_x;
|
||||
params.y = 0.56f;
|
||||
params.scale = 1.04f;
|
||||
params.color = WHITE;
|
||||
gl->font_ctx->render_msg(gl, buf, ¶ms);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,12 +80,44 @@ static bool gfx_ctx_xdk_window_has_focus(void)
|
||||
static void gfx_ctx_xdk_update_window_title(void)
|
||||
{
|
||||
char buf[128];
|
||||
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
|
||||
|
||||
gfx_get_fps(buf, sizeof(buf), false);
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))
|
||||
{
|
||||
#if defined(_XBOX1)
|
||||
float mem_width = font_x + 30;
|
||||
float mem_height = font_y + 50;
|
||||
#elif defined(_XBOX360)
|
||||
float mem_width = (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_HD)) ? 160 : 100;
|
||||
float mem_height = 70;
|
||||
#endif
|
||||
MEMORYSTATUS stat;
|
||||
font_params_t font_parms = {0};
|
||||
|
||||
GlobalMemoryStatus(&stat);
|
||||
|
||||
font_parms.x = mem_width;
|
||||
font_parms.y = mem_height;
|
||||
font_parms.scale = 0;
|
||||
font_parms.color = 0;
|
||||
|
||||
if (d3d->font_ctx)
|
||||
{
|
||||
font_parms.y = mem_height + 30;
|
||||
d3d->font_ctx->render_msg(d3d, buf, &font_parms);
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), "%.2f MB free / %.2f MB total", stat.dwAvailPhys/(1024.0f*1024.0f), stat.dwTotalPhys/(1024.0f*1024.0f));
|
||||
|
||||
if (d3d->font_ctx)
|
||||
d3d->font_ctx->render_msg(d3d, buf, &font_parms);
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_ctx_xdk_get_video_size(unsigned *width, unsigned *height)
|
||||
{
|
||||
xdk_d3d_video_t *device_ptr = (xdk_d3d_video_t*)driver.video_data;
|
||||
#if defined(_XBOX360)
|
||||
XVIDEO_MODE video_mode;
|
||||
XGetVideoMode(&video_mode);
|
||||
|
@ -1005,32 +1005,6 @@ NULL, NULL, NULL, 0);
|
||||
float msg_height = mem_height + 50;
|
||||
#endif
|
||||
|
||||
font_params_t font_parms = {0};
|
||||
|
||||
if (lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))
|
||||
{
|
||||
MEMORYSTATUS stat;
|
||||
char buf[128];
|
||||
|
||||
GlobalMemoryStatus(&stat);
|
||||
|
||||
font_parms.x = mem_width;
|
||||
font_parms.y = mem_height;
|
||||
font_parms.scale = 0;
|
||||
font_parms.color = 0;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%.2f MB free / %.2f MB total", stat.dwAvailPhys/(1024.0f*1024.0f), stat.dwTotalPhys/(1024.0f*1024.0f));
|
||||
if (d3d->font_ctx)
|
||||
d3d->font_ctx->render_msg(d3d, buf, &font_parms);
|
||||
|
||||
gfx_get_fps(buf, sizeof(buf), true);
|
||||
if (d3d->font_ctx)
|
||||
{
|
||||
font_parms.y = mem_height + 30;
|
||||
d3d->font_ctx->render_msg(d3d, buf, &font_parms);
|
||||
}
|
||||
}
|
||||
|
||||
if (msg)
|
||||
{
|
||||
font_parms.x = msg_width;
|
||||
|
Loading…
Reference in New Issue
Block a user