diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-09-13 10:48:02 -0700 |
---|---|---|
committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-09-13 13:17:57 -0700 |
commit | ae0d8136ce0d3c39ca80c64763e633b86b0c5453 (patch) | |
tree | d915d4de2208fc2dfc58ab5a7bc83be066b5472a /android/main.c | |
parent | 4939812780883255043a09eceaf607263f30fde4 (diff) | |
download | external_qemu-ae0d8136ce0d3c39ca80c64763e633b86b0c5453.zip external_qemu-ae0d8136ce0d3c39ca80c64763e633b86b0c5453.tar.gz external_qemu-ae0d8136ce0d3c39ca80c64763e633b86b0c5453.tar.bz2 |
Add cmdline param to control fake camera emulation
- Enable / Disable fake camera
- Set fake camera facing direction: back, or front
Change-Id: Iab741a694daf2bf752e91e23df566a83ac7a97e7
Diffstat (limited to 'android/main.c')
-rw-r--r-- | android/main.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/android/main.c b/android/main.c index 0b1d64c..314779f 100644 --- a/android/main.c +++ b/android/main.c @@ -1072,9 +1072,9 @@ int main(int argc, char **argv) if (opts->gpu) { const char* gpu = opts->gpu; - if (!strcmp(gpu,"on") || !strcmp(gpu,"enabled")) { + if (!strcmp(gpu,"on") || !strcmp(gpu,"enable")) { hw->hw_gpu_enabled = 1; - } else if (!strcmp(gpu,"off") || !strcmp(gpu,"disabled")) { + } else if (!strcmp(gpu,"off") || !strcmp(gpu,"disable")) { hw->hw_gpu_enabled = 0; } else if (!strcmp(gpu,"auto")) { /* Nothing to do */ @@ -1085,6 +1085,19 @@ int main(int argc, char **argv) } } + if (opts->fake_camera) { + if (!strcmp(opts->fake_camera, "back") || + !strcmp(opts->fake_camera, "front") || + !strcmp(opts->fake_camera, "off")) { + hw->hw_fakeCamera = ASTRDUP(opts->fake_camera); + } else { + derror("Invalid value for -fake-camera <mode> parameter: %s\n", + opts->fake_camera); + derror("Valid values are: back, front, or off\n"); + exit(1); + } + } + /* physical memory is now in hw->hw_ramSize */ hw->avd_name = ASTRDUP(avdInfo_getName(avd)); |