(Thread wrapper) Fix CMD_SET_VIEWPORT

This commit is contained in:
Twinaphex 2015-04-27 00:06:34 +02:00
parent d0b3aa24c4
commit b02986ff94

View File

@ -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)