mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
(Thread wrapper) Fix CMD_SET_VIEWPORT
This commit is contained in:
parent
d0b3aa24c4
commit
b02986ff94
@ -126,16 +126,6 @@ static void thread_loop(void *data)
|
||||
thread_reply(thr, CMD_FREE);
|
||||
return;
|
||||
|
||||
case CMD_SET_VIEWPORT:
|
||||
if (thr->driver && thr->driver->set_viewport)
|
||||
thr->driver->set_viewport(thr->driver_data,
|
||||
thr->cmd_data.set_viewport.width,
|
||||
thr->cmd_data.set_viewport.height,
|
||||
thr->cmd_data.set_viewport.force_full,
|
||||
thr->cmd_data.set_viewport.allow_rotate);
|
||||
thread_reply(thr, CMD_SET_VIEWPORT);
|
||||
break;
|
||||
|
||||
case CMD_SET_ROTATION:
|
||||
if (thr->driver && thr->driver->set_rotation)
|
||||
thr->driver->set_rotation(thr->driver_data, thr->cmd_data.i);
|
||||
@ -622,14 +612,22 @@ static void thread_set_viewport(void *data, unsigned width,
|
||||
|
||||
if (!thr)
|
||||
return;
|
||||
|
||||
slock_lock(thr->lock);
|
||||
|
||||
thr->cmd_data.set_viewport.width = width;
|
||||
thr->cmd_data.set_viewport.height = height;
|
||||
thr->cmd_data.set_viewport.force_full = force_full;
|
||||
thr->cmd_data.set_viewport.allow_rotate = allow_rotate;
|
||||
|
||||
thread_send_cmd(thr, CMD_SET_VIEWPORT);
|
||||
thread_wait_reply(thr, CMD_SET_VIEWPORT);
|
||||
|
||||
if (thr->driver && thr->driver->set_viewport)
|
||||
thr->driver->set_viewport(thr->driver_data,
|
||||
thr->cmd_data.set_viewport.width,
|
||||
thr->cmd_data.set_viewport.height,
|
||||
thr->cmd_data.set_viewport.force_full,
|
||||
thr->cmd_data.set_viewport.allow_rotate);
|
||||
|
||||
slock_unlock(thr->lock);
|
||||
}
|
||||
|
||||
static void thread_set_rotation(void *data, unsigned rotation)
|
||||
|
Loading…
x
Reference in New Issue
Block a user