mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
This stops the crashes with video_get_output_size/next/prev
This commit is contained in:
parent
de903c650d
commit
0bf0e355ec
@ -48,9 +48,6 @@ enum thread_cmd
|
|||||||
|
|
||||||
CMD_POKE_SET_VIDEO_MODE,
|
CMD_POKE_SET_VIDEO_MODE,
|
||||||
CMD_POKE_SET_FILTERING,
|
CMD_POKE_SET_FILTERING,
|
||||||
CMD_POKE_GET_VIDEO_OUTPUT_SIZE,
|
|
||||||
CMD_POKE_GET_VIDEO_OUTPUT_PREV,
|
|
||||||
CMD_POKE_GET_VIDEO_OUTPUT_NEXT,
|
|
||||||
|
|
||||||
CMD_POKE_SET_FBO_STATE,
|
CMD_POKE_SET_FBO_STATE,
|
||||||
CMD_POKE_GET_FBO_STATE,
|
CMD_POKE_GET_FBO_STATE,
|
||||||
@ -499,26 +496,6 @@ static bool video_thread_handle_packet(
|
|||||||
video_thread_reply(thr, &pkt);
|
video_thread_reply(thr, &pkt);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_POKE_GET_VIDEO_OUTPUT_SIZE:
|
|
||||||
if (thr->poke && thr->poke->get_video_output_size)
|
|
||||||
thr->poke->get_video_output_size(thr->driver_data,
|
|
||||||
&pkt.data.output.width,
|
|
||||||
&pkt.data.output.height);
|
|
||||||
video_thread_reply(thr, &pkt);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_POKE_GET_VIDEO_OUTPUT_PREV:
|
|
||||||
if (thr->poke && thr->poke->get_video_output_prev)
|
|
||||||
thr->poke->get_video_output_prev(thr->driver_data);
|
|
||||||
video_thread_reply(thr, &pkt);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_POKE_GET_VIDEO_OUTPUT_NEXT:
|
|
||||||
if (thr->poke && thr->poke->get_video_output_next)
|
|
||||||
thr->poke->get_video_output_next(thr->driver_data);
|
|
||||||
video_thread_reply(thr, &pkt);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CMD_POKE_SET_ASPECT_RATIO:
|
case CMD_POKE_SET_ASPECT_RATIO:
|
||||||
if (thr->poke && thr->poke->set_aspect_ratio)
|
if (thr->poke && thr->poke->set_aspect_ratio)
|
||||||
thr->poke->set_aspect_ratio(thr->driver_data,
|
thr->poke->set_aspect_ratio(thr->driver_data,
|
||||||
@ -1107,37 +1084,36 @@ static void thread_get_video_output_size(void *data,
|
|||||||
unsigned *width, unsigned *height)
|
unsigned *width, unsigned *height)
|
||||||
{
|
{
|
||||||
thread_video_t *thr = (thread_video_t*)data;
|
thread_video_t *thr = (thread_video_t*)data;
|
||||||
thread_packet_t pkt = { CMD_POKE_GET_VIDEO_OUTPUT_SIZE };
|
|
||||||
|
|
||||||
if (!thr)
|
if (!thr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
video_thread_send_and_wait_user_to_thread(thr, &pkt);
|
if (thr->poke && thr->poke->get_video_output_size)
|
||||||
|
thr->poke->get_video_output_size(thr->driver_data,
|
||||||
*width = pkt.data.output.width;
|
width,
|
||||||
*height = pkt.data.output.height;
|
height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void thread_get_video_output_prev(void *data)
|
static void thread_get_video_output_prev(void *data)
|
||||||
{
|
{
|
||||||
thread_video_t *thr = (thread_video_t*)data;
|
thread_video_t *thr = (thread_video_t*)data;
|
||||||
thread_packet_t pkt = { CMD_POKE_GET_VIDEO_OUTPUT_PREV };
|
|
||||||
|
|
||||||
if (!thr)
|
if (!thr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
video_thread_send_and_wait_user_to_thread(thr, &pkt);
|
if (thr->poke && thr->poke->get_video_output_prev)
|
||||||
|
thr->poke->get_video_output_prev(thr->driver_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void thread_get_video_output_next(void *data)
|
static void thread_get_video_output_next(void *data)
|
||||||
{
|
{
|
||||||
thread_video_t *thr = (thread_video_t*)data;
|
thread_video_t *thr = (thread_video_t*)data;
|
||||||
thread_packet_t pkt = { CMD_POKE_GET_VIDEO_OUTPUT_NEXT };
|
|
||||||
|
|
||||||
if (!thr)
|
if (!thr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
video_thread_send_and_wait_user_to_thread(thr, &pkt);
|
if (thr->poke && thr->poke->get_video_output_next)
|
||||||
|
thr->poke->get_video_output_next(thr->driver_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void thread_set_aspect_ratio(void *data, unsigned aspectratio_idx)
|
static void thread_set_aspect_ratio(void *data, unsigned aspectratio_idx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user