mirror of https://github.com/PCSX2/pcsx2.git
Eyetoy: Don't send duplicate frames
This commit is contained in:
parent
02546459ea
commit
2eb6d9a0fb
|
@ -502,6 +502,7 @@ namespace usb_eyetoy
|
||||||
if (len < (int)mpeg_buffer.length)
|
if (len < (int)mpeg_buffer.length)
|
||||||
len2 = len;
|
len2 = len;
|
||||||
memcpy(buf, mpeg_buffer.start, len2);
|
memcpy(buf, mpeg_buffer.start, len2);
|
||||||
|
mpeg_buffer.length = 0;
|
||||||
mpeg_mutex.unlock();
|
mpeg_mutex.unlock();
|
||||||
return len2;
|
return len2;
|
||||||
};
|
};
|
||||||
|
|
|
@ -474,6 +474,7 @@ namespace usb_eyetoy
|
||||||
if (len < mpeg_buffer.length)
|
if (len < mpeg_buffer.length)
|
||||||
len2 = len;
|
len2 = len;
|
||||||
memcpy(buf, mpeg_buffer.start, len2);
|
memcpy(buf, mpeg_buffer.start, len2);
|
||||||
|
mpeg_buffer.length = 0;
|
||||||
mpeg_mutex.unlock();
|
mpeg_mutex.unlock();
|
||||||
return len2;
|
return len2;
|
||||||
};
|
};
|
||||||
|
|
|
@ -426,7 +426,8 @@ namespace usb_eyetoy
|
||||||
s->mpeg_frame_size = s->videodev->GetImage(s->mpeg_frame_data, 320 * 240 * 2);
|
s->mpeg_frame_size = s->videodev->GetImage(s->mpeg_frame_data, 320 * 240 * 2);
|
||||||
if (s->mpeg_frame_size == 0)
|
if (s->mpeg_frame_size == 0)
|
||||||
{
|
{
|
||||||
goto send_packet;
|
p->status = USB_RET_NAK;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t header[] = {
|
uint8_t header[] = {
|
||||||
|
|
Loading…
Reference in New Issue