mirror of
https://github.com/libretro/RetroArch
synced 2025-02-26 06:40:39 +00:00
Fix threaded driver.
Fix case when no poke interface was implemented.
This commit is contained in:
parent
e389220df8
commit
f73f1971f9
@ -197,6 +197,10 @@ static void *sdl_gfx_init(const video_info_t *video, const input_driver_t **inpu
|
||||
gfx_set_dwm();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X11
|
||||
XInitThreads();
|
||||
#endif
|
||||
|
||||
SDL_InitSubSystem(SDL_INIT_VIDEO);
|
||||
|
||||
sdl_video_t *vid = (sdl_video_t*)calloc(1, sizeof(*vid));
|
||||
|
@ -306,6 +306,8 @@ static void thread_loop(void *data)
|
||||
thr->texture.alpha);
|
||||
thr->texture.frame_updated = false;
|
||||
}
|
||||
|
||||
if (thr->poke && thr->poke->set_texture_enable)
|
||||
thr->poke->set_texture_enable(thr->driver_data, thr->texture.enable);
|
||||
#endif
|
||||
|
||||
@ -688,9 +690,15 @@ static const video_poke_interface_t thread_poke = {
|
||||
static void thread_get_poke_interface(void *data, const video_poke_interface_t **iface)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
|
||||
if (thr->driver->poke_interface)
|
||||
{
|
||||
*iface = &thread_poke;
|
||||
thr->driver->poke_interface(thr->driver_data, &thr->poke);
|
||||
}
|
||||
else
|
||||
*iface = NULL;
|
||||
}
|
||||
|
||||
#if defined(HAVE_RMENU) || defined(HAVE_RGUI)
|
||||
// all stubs for now, might not have to implement them unless we want to port this to consoles
|
||||
|
@ -330,6 +330,8 @@ static void *xv_init(const video_info_t *video, const input_driver_t **input, vo
|
||||
if (!xv)
|
||||
return NULL;
|
||||
|
||||
XInitThreads();
|
||||
|
||||
xv->display = XOpenDisplay(NULL);
|
||||
struct sigaction sa;
|
||||
unsigned adaptor_count = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user