aboutsummaryrefslogtreecommitdiffstats
path: root/vl-android.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2012-03-19 11:35:29 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2012-03-19 14:22:59 -0700
commit7485c2989d727a1d0c14a66fb75e140f885a1583 (patch)
treed4e44279f3f7c2c12a58e3ed23eca8fe376ab207 /vl-android.c
parent863d1010d9c8fa4342b1b0ea860bcfb096806acc (diff)
downloadexternal_qemu-7485c2989d727a1d0c14a66fb75e140f885a1583.zip
external_qemu-7485c2989d727a1d0c14a66fb75e140f885a1583.tar.gz
external_qemu-7485c2989d727a1d0c14a66fb75e140f885a1583.tar.bz2
Refactor HW config to use hw.camera_back, and hw.camera_front properties.
This is a continuation of an effort to simplify HW config, and make the UI for it clearer. This CL gets rid of multiple camera emulation properties, combining everything into just two properties: - hw.camera_back that controls emulation of a camera facing back, and - hw.camera_front that controls emulation of a camera facing front. Change-Id: Ia114ae4caf2053685cbff00f39088e5b5be2952c
Diffstat (limited to 'vl-android.c')
-rw-r--r--vl-android.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/vl-android.c b/vl-android.c
index ebff1eb..1ec910b 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -3764,10 +3764,21 @@ int main(int argc, char **argv, char **envp)
//android_hw_opengles_init();
/* Initialize fake camera */
- if (android_hw->hw_fakeCamera) {
- boot_property_add("qemu.sf.fake_camera", android_hw->hw_fakeCamera);
+ if (strcmp(android_hw->hw_camera_back, "emulated") &&
+ strcmp(android_hw->hw_camera_front, "emulated")) {
+ /* Fake camera is not used for camera emulation. */
+ boot_property_add("qemu.sf.fake_camera", "none");
} else {
- boot_property_add("qemu.sf.fake_camera", "back");
+ /* Fake camera is used for at least one camera emulation. */
+ if (!strcmp(android_hw->hw_camera_back, "emulated") &&
+ !strcmp(android_hw->hw_camera_front, "emulated")) {
+ /* Fake camera is used for both, front and back camera emulation. */
+ boot_property_add("qemu.sf.fake_camera", "both");
+ } else if (!strcmp(android_hw->hw_camera_back, "emulated")) {
+ boot_property_add("qemu.sf.fake_camera", "back");
+ } else {
+ boot_property_add("qemu.sf.fake_camera", "front");
+ }
}
/* Initialize camera emulation. */