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();
|
gfx_set_dwm();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_X11
|
||||||
|
XInitThreads();
|
||||||
|
#endif
|
||||||
|
|
||||||
SDL_InitSubSystem(SDL_INIT_VIDEO);
|
SDL_InitSubSystem(SDL_INIT_VIDEO);
|
||||||
|
|
||||||
sdl_video_t *vid = (sdl_video_t*)calloc(1, sizeof(*vid));
|
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.alpha);
|
||||||
thr->texture.frame_updated = false;
|
thr->texture.frame_updated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (thr->poke && thr->poke->set_texture_enable)
|
||||||
thr->poke->set_texture_enable(thr->driver_data, thr->texture.enable);
|
thr->poke->set_texture_enable(thr->driver_data, thr->texture.enable);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -688,8 +690,14 @@ static const video_poke_interface_t thread_poke = {
|
|||||||
static void thread_get_poke_interface(void *data, const video_poke_interface_t **iface)
|
static void thread_get_poke_interface(void *data, const video_poke_interface_t **iface)
|
||||||
{
|
{
|
||||||
thread_video_t *thr = (thread_video_t*)data;
|
thread_video_t *thr = (thread_video_t*)data;
|
||||||
|
|
||||||
|
if (thr->driver->poke_interface)
|
||||||
|
{
|
||||||
*iface = &thread_poke;
|
*iface = &thread_poke;
|
||||||
thr->driver->poke_interface(thr->driver_data, &thr->poke);
|
thr->driver->poke_interface(thr->driver_data, &thr->poke);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
*iface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_RMENU) || defined(HAVE_RGUI)
|
#if defined(HAVE_RMENU) || defined(HAVE_RGUI)
|
||||||
|
@ -330,6 +330,8 @@ static void *xv_init(const video_info_t *video, const input_driver_t **input, vo
|
|||||||
if (!xv)
|
if (!xv)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
XInitThreads();
|
||||||
|
|
||||||
xv->display = XOpenDisplay(NULL);
|
xv->display = XOpenDisplay(NULL);
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
unsigned adaptor_count = 0;
|
unsigned adaptor_count = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user