mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 10:13:43 +01:00
Check that we actually got a preview size.
This commit is contained in:
1 parent
b5053b947c
commit
7bb524810d
1 file changed
+5
-1
@@ -218,6 +218,10 @@ class CameraHelper {
|
||||
}
|
||||
}
|
||||
|
||||
if (mPreviewSize == null) {
|
||||
throw new Exception("Couldn't find a viable preview size");
|
||||
}
|
||||
|
||||
Log.d(TAG, "setPreviewSize(" + mPreviewSize.width + ", " + mPreviewSize.height + ")");
|
||||
param.setPreviewSize(mPreviewSize.width, mPreviewSize.height);
|
||||
|
||||
@@ -239,7 +243,7 @@ class CameraHelper {
|
||||
mCamera.setPreviewCallback(mPreviewCallback);
|
||||
mCamera.startPreview();
|
||||
mIsCameraRunning = true;
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Cannot start camera: " + e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user