diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 3db9a32714..5ce3dfb705 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -426,10 +426,6 @@ void *video_driver_get_ptr(void) return VIDEO_DRIVER_GET_PTR_INTERNAL(video_st); } -void *video_driver_get_data(void) -{ - return video_driver_st.data; -} video_driver_t *hw_render_context_driver( enum retro_hw_context_type type, int major, int minor) @@ -1212,11 +1208,6 @@ bool video_display_server_get_flags(gfx_ctx_flags_t *flags) return true; } -bool video_driver_started_fullscreen(void) -{ - video_driver_state_t *video_st = &video_driver_st; - return video_st->started_fullscreen; -} bool video_driver_is_threaded(void) { diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 4466229e01..6c1163132d 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -1056,8 +1056,6 @@ void *video_driver_get_ptr(void); video_driver_state_t *video_state_get_ptr(void); -void *video_driver_get_data(void); - bool video_driver_set_rotation(unsigned rotation); bool video_driver_set_video_mode(unsigned width, @@ -1299,8 +1297,6 @@ float video_driver_get_refresh_rate(void); bool video_driver_has_widgets(void); #endif -bool video_driver_started_fullscreen(void); - bool video_driver_is_threaded(void); bool video_context_driver_get_flags(gfx_ctx_flags_t *flags); diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index dbdbd2303d..41320387fd 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -23,6 +23,7 @@ #include #include +#include "video_driver.h" #include "video_thread_wrapper.h" #include "font_driver.h" @@ -1343,8 +1344,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_data(); + video_driver_state_t *video_st = video_state_get_ptr(); + thread_video_t *thr = video_st ? (thread_video_t*)video_st->data : NULL; if (!thr) return false; @@ -1368,7 +1369,8 @@ 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_data(); + video_driver_state_t *video_st = video_state_get_ptr(); + thread_video_t *thr = video_st ? (thread_video_t*)video_st->data : NULL; if (!thr) return 0; diff --git a/ui/drivers/ui_qt.cpp b/ui/drivers/ui_qt.cpp index 2536fbfd54..ead4a7ef63 100644 --- a/ui/drivers/ui_qt.cpp +++ b/ui/drivers/ui_qt.cpp @@ -4947,6 +4947,8 @@ static void ui_companion_qt_toggle(void *data, bool force) if (ui_companion_toggle || force) { + video_driver_state_t *video_st = video_state_get_ptr(); + if (mouse_grabbed) command_event(CMD_EVENT_GRAB_MOUSE_TOGGLE, NULL); video_driver_show_mouse(); @@ -4958,7 +4960,8 @@ static void ui_companion_qt_toggle(void *data, bool force) win_handle->qtWindow->raise(); win_handle->qtWindow->show(); - if (video_driver_started_fullscreen()) + if ( video_st + && video_st->started_fullscreen) win_handle->qtWindow->lower(); if (!already_started)