diff --git a/gfx/video_driver.c b/gfx/video_driver.c index f6fcfedd30..ea92fc776b 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -163,8 +163,8 @@ static uint64_t video_driver_frame_count = 0; static video_viewport_t video_viewport_custom; -void *video_driver_data = NULL; -video_driver_t *current_video = NULL; +static void *video_driver_data = NULL; +static video_driver_t *current_video = NULL; /* Interface for "poking". */ static const video_poke_interface_t *video_driver_poke = NULL; @@ -2609,12 +2609,11 @@ void video_driver_get_window_title(char *buf, unsigned len) } } - void video_driver_get_status(uint64_t *frame_count, bool * is_alive, bool *is_focused) { *frame_count = video_driver_frame_count; - *is_alive = video_driver_is_alive(); + *is_alive = current_video ? current_video->alive(video_driver_data) : true; *is_focused = video_driver_cb_has_focus(); } diff --git a/gfx/video_driver.h b/gfx/video_driver.h index d2dd72cd4b..a61168b4f7 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -181,9 +181,6 @@ struct uniform_info } result; }; - - - typedef struct shader_backend { void *(*init)(void *data, const char *path); @@ -779,8 +776,6 @@ struct aspect_ratio_elem extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END]; -#define video_driver_is_alive() ((current_video) ? current_video->alive(video_driver_data) : true) - bool video_driver_is_focused(void); bool video_driver_has_windowed(void); @@ -1120,9 +1115,6 @@ extern const gfx_ctx_driver_t gfx_ctx_khr_display; extern const gfx_ctx_driver_t gfx_ctx_gdi; extern const gfx_ctx_driver_t gfx_ctx_null; -extern void *video_driver_data; -extern video_driver_t *current_video; - /** * video_context_driver_init_first: * @data : Input data.