mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
This commit is contained in:
parent
1bf241d826
commit
7a58c8afbf
@ -140,10 +140,14 @@ class CameraHelper {
|
||||
ArrayList<String> deviceList = new ArrayList<>();
|
||||
int nrCam = Camera.getNumberOfCameras();
|
||||
for (int index = 0; index < nrCam; index++) {
|
||||
Camera.CameraInfo info = new Camera.CameraInfo();
|
||||
Camera.getCameraInfo(index, info);
|
||||
String devName = index + ":" + (info.facing == Camera.CameraInfo.CAMERA_FACING_BACK ? "Back Camera" : "Front Camera");
|
||||
deviceList.add(devName);
|
||||
try {
|
||||
Camera.CameraInfo info = new Camera.CameraInfo();
|
||||
Camera.getCameraInfo(index, info);
|
||||
String devName = index + ":" + (info.facing == Camera.CameraInfo.CAMERA_FACING_BACK ? "Back Camera" : "Front Camera");
|
||||
deviceList.add(devName);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to get camera info: " + e.toString());
|
||||
}
|
||||
}
|
||||
return deviceList;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user