mirror of https://github.com/PCSX2/pcsx2.git
USB: Fix CaptureEye corruption on dark images
This commit is contained in:
parent
64e17fce3f
commit
517fba3686
|
@ -435,7 +435,7 @@ namespace usb_eyetoy
|
|||
float r = src[2];
|
||||
float g = src[1];
|
||||
float b = src[0];
|
||||
comprBuf[in_pos++] = 0.299f * r + 0.587f * g + 0.114f * b;
|
||||
comprBuf[in_pos++] = std::clamp<u8>(0.299f * r + 0.587f * g + 0.114f * b, 1, 255);
|
||||
}
|
||||
}
|
||||
comprBuf.resize(80 * 64);
|
||||
|
@ -498,7 +498,7 @@ namespace usb_eyetoy
|
|||
{
|
||||
for (int x = 0; x < 80; x++)
|
||||
{
|
||||
comprBuf[80 * y + x] = 255 * y / 80;
|
||||
comprBuf[80 * y + x] = std::clamp<u8>(255 * y / 80, 1, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue