diff --git a/pcsx2/USB/usb-eyetoy/cam-windows.cpp b/pcsx2/USB/usb-eyetoy/cam-windows.cpp index ef79bf144f104..301a9284ae9e1 100644 --- a/pcsx2/USB/usb-eyetoy/cam-windows.cpp +++ b/pcsx2/USB/usb-eyetoy/cam-windows.cpp @@ -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(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(255 * y / 80, 1, 255); } } }