Create gfx_ctx_get_metrics

This commit is contained in:
twinaphex 2015-04-09 18:55:22 +02:00
parent 8616a9bf28
commit a002ce6e6d
2 changed files with 12 additions and 0 deletions

View File

@ -81,6 +81,16 @@ const gfx_ctx_driver_t *gfx_ctx_get_ptr(void)
return (const gfx_ctx_driver_t*)driver->video_context;
}
bool gfx_ctx_get_metrics(enum display_metric_types type, float *value)
{
driver_t *driver = driver_get_ptr();
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
if (!ctx || !driver)
return false;
return ctx->get_metrics(driver->video_context_data, type,
value);
}
/**
* find_gfx_ctx_driver_index:
* @ident : Identifier of resampler driver to find.

View File

@ -202,6 +202,8 @@ void find_prev_gfx_context_driver(void);
const gfx_ctx_driver_t *gfx_ctx_get_ptr(void);
bool gfx_ctx_get_metrics(enum display_metric_types type, float *value);
#ifdef __cplusplus
}
#endif