int cmd = 0, pos = 0, len, dummy;
int skip = 1;
+ // XXX: polylines are not properly handled
while (pos < count && skip) {
uint32_t *list = data + pos;
cmd = list[0] >> 24;
continue;
}
- if (gpu.frameskip.active && gpu.frameskip.allow)
+ // 0xex cmds might affect frameskip.allow, so pass to do_cmd_list_skip
+ if (gpu.frameskip.active && (gpu.frameskip.allow || ((data[pos] >> 24) & 0xf0) == 0xe0))
pos += do_cmd_list_skip(data + pos, count - pos, &cmd);
else {
pos += do_cmd_list(data + pos, count - pos, &cmd);
memcpy(gpu.regs, freeze->ulControl, sizeof(gpu.regs));
memcpy(gpu.ex_regs, freeze->ulControl + 0xe0, sizeof(gpu.ex_regs));
gpu.status.reg = freeze->ulStatus;
+ gpu.cmd_len = 0;
for (i = 8; i > 0; i--) {
gpu.regs[i] ^= 1; // avoid reg change detection
GPUwriteStatus((i << 24) | (gpu.regs[i] ^ 1));