diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index 9052130198..0336ddb65c 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -1259,7 +1259,8 @@ bool video_thread_font_init(const void **font_driver, void **font_handle, bool is_threaded) { thread_packet_t pkt; - thread_video_t *thr = (thread_video_t*)video_driver_get_ptr(true); + thread_video_t *thr = (thread_video_t*) + video_driver_get_data(); if (!thr) return false; @@ -1283,7 +1284,7 @@ unsigned video_thread_texture_load(void *data, custom_command_method_t func) { thread_packet_t pkt; - thread_video_t *thr = (thread_video_t*)video_driver_get_ptr(true); + thread_video_t *thr = (thread_video_t*)video_driver_get_data(); if (!thr) return 0; diff --git a/retroarch.c b/retroarch.c index 517160660a..31323f3cb5 100644 --- a/retroarch.c +++ b/retroarch.c @@ -435,6 +435,12 @@ void *video_driver_get_ptr(bool force_nonthreaded_data) return VIDEO_DRIVER_GET_PTR_INTERNAL(p_rarch, force_nonthreaded_data); } +void *video_driver_get_data(void) +{ + struct rarch_state *p_rarch = &rarch_st; + return p_rarch->video_driver_data; +} + static int16_t input_state_wrap( input_driver_t *current_input, void *data, diff --git a/retroarch.h b/retroarch.h index a0a0508bdd..3b4ae88875 100644 --- a/retroarch.h +++ b/retroarch.h @@ -1585,6 +1585,8 @@ const char* config_get_video_driver_options(void); **/ void *video_driver_get_ptr(bool force_nonthreaded_data); +void *video_driver_get_data(void); + bool video_driver_set_rotation(unsigned rotation); bool video_driver_set_video_mode(unsigned width,