mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-27 00:03:37 +01:00
Camera: Simplify an expression.
Make this readable by breaking it up. Like one would sentences.
This commit is contained in:
1 parent
51b94a9c9c
commit
f214b7d422
1 file changed
+4
-4
+4
-4
@@ -338,10 +338,10 @@ int __v4l_startCapture(int ideal_width, int ideal_height) {
|
||||
frmsize.index++;
|
||||
if (frmsize.type == V4L2_FRMSIZE_TYPE_DISCRETE) {
|
||||
INFO_LOG(HLE, "V4L2: frame size supported: %dx%d", frmsize.discrete.width, frmsize.discrete.height);
|
||||
if (frmsize.discrete.width >= ideal_width && frmsize.discrete.height >= ideal_height
|
||||
&& fmt.fmt.pix.width == 0 && fmt.fmt.pix.height == 0
|
||||
|| frmsize.discrete.width >= ideal_width && frmsize.discrete.height >= ideal_height
|
||||
&& frmsize.discrete.width < fmt.fmt.pix.width && frmsize.discrete.height < fmt.fmt.pix.height) {
|
||||
bool matchesIdeal = frmsize.discrete.width >= ideal_width && frmsize.discrete.height >= ideal_height;
|
||||
bool zeroPix = fmt.fmt.pix.width == 0 && fmt.fmt.pix.height == 0;
|
||||
bool pixLarger = frmsize.discrete.width < fmt.fmt.pix.width && frmsize.discrete.height < fmt.fmt.pix.height;
|
||||
if (matchesIdeal && (zeroPix || pixLarger)) {
|
||||
fmt.fmt.pix.width = frmsize.discrete.width;
|
||||
fmt.fmt.pix.height = frmsize.discrete.height;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user