From a002ce6e6d9062325b5714244071fb4ac3f41738 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 9 Apr 2015 18:55:22 +0200 Subject: [PATCH] Create gfx_ctx_get_metrics --- gfx/video_context_driver.c | 10 ++++++++++ gfx/video_context_driver.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index 44bc84b47c..b3e926da7a 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -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. diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index bfb6e5395b..d46fb63a74 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -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