click: fix camera failure after zoom usage

libcamera was changing the image resolution without updating
mRawWidth and mRawHeight, and this caused initRaw to take pictures
with the previous resolution. If that resolution was unsuitable
because of zoom level, it would cause the camera to fail until
it was restarted.

This patch updates both variables to reflect the modified
resolution so initRaw always takes pictures with the correct
width and height.

Change-Id: I33e8445a65ac667a030b35b103f86be46381abc4
This commit is contained in:
Emilio López 2011-11-28 09:03:19 +01:00 committed by KalimochoAz
parent 3219d207b4
commit ff9d9e3fa4

View File

@ -2015,7 +2015,9 @@ void QualcommCameraHardware::setZoom()
multiplier = getParm("picture-size", picturesize);
LOGV("Reducing picture quality; new multiplier: %d", multiplier);
}
level = zoomsel * (iscamcorder ? (multiplier*5)/6 : 5);
level = zoomsel * (iscamcorder ? (multiplier*5) / 6 : 5);
//Update the parameters so initRaw doesn't use the wrong size later
mParameters.getPictureSize(&mRawWidth, &mRawHeight);
LOGV("Level: %d, Multiplier: %d ZoomSel: %d",level,multiplier,zoomsel);
}
} else {