Add gfx_ctx_get_ident

This commit is contained in:
twinaphex 2015-04-16 20:00:10 +02:00
parent b818038314
commit cd76c3f975
3 changed files with 19 additions and 0 deletions

View File

@ -91,6 +91,15 @@ void gfx_ctx_free(void *data)
ctx = NULL;
}
const char *gfx_ctx_get_ident(void)
{
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
if (!ctx)
return NULL;
return ctx->ident;
}
void gfx_ctx_update_window_title(void *data)
{
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();

View File

@ -243,6 +243,8 @@ void gfx_ctx_get_video_output_prev(void *data);
void gfx_ctx_get_video_output_next(void *data);
const char *gfx_ctx_get_ident(void);
void gfx_ctx_free(void *data);
void gfx_ctx_input_driver(void *data,

View File

@ -286,6 +286,7 @@ static int deferred_push_system_information(void *data, void *userdata,
{
char tmp[PATH_MAX_LENGTH];
const char *tmp_string;
char tmp2[PATH_MAX_LENGTH];
const frontend_ctx_driver_t *frontend = frontend_get_ptr();
@ -319,6 +320,13 @@ static int deferred_push_system_information(void *data, void *userdata,
MENU_SETTINGS_CORE_INFO_NONE, 0);
}
tmp_string = gfx_ctx_get_ident();
snprintf(tmp, sizeof(tmp), "Video context driver: %s",
tmp_string ? tmp_string : "N/A");
menu_list_push(list, tmp, "",
MENU_SETTINGS_CORE_INFO_NONE, 0);
{
float val = 0.0f;
if (gfx_ctx_get_metrics(DISPLAY_METRIC_MM_WIDTH, &val))