aboutsummaryrefslogtreecommitdiffstats
path: root/android/main.c
diff options
context:
space:
mode:
authorDavid Turner <digit@android.com>2011-09-12 21:27:56 +0200
committerDavid 'Digit' Turner <digit@google.com>2011-09-13 13:02:27 +0200
commit9da935dd0c616cfd9072d11080a622320497dc9e (patch)
treeb28c8dd45ec543090c6be340d1d211cee94c0f99 /android/main.c
parent9ff69721d24f81317183ddb2e9e352bb34650752 (diff)
downloadexternal_qemu-9da935dd0c616cfd9072d11080a622320497dc9e.zip
external_qemu-9da935dd0c616cfd9072d11080a622320497dc9e.tar.gz
external_qemu-9da935dd0c616cfd9072d11080a622320497dc9e.tar.bz2
Add -gpu <mode> option to force GPU emulation
By default, GPU emulation is still disabled. You can still try to force it with '-gpu on' for experimentation purpose (alternatively, you can define hw.gpu.enabled to 'true' in your AVD config.ini) Change-Id: I87efdf45337a80aeadd94b3922312b3f564c1608
Diffstat (limited to 'android/main.c')
-rw-r--r--android/main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/android/main.c b/android/main.c
index 8fb9485..0b1d64c 100644
--- a/android/main.c
+++ b/android/main.c
@@ -1070,6 +1070,21 @@ int main(int argc, char **argv)
args[n++] = opts->memcheck;
}
+ if (opts->gpu) {
+ const char* gpu = opts->gpu;
+ if (!strcmp(gpu,"on") || !strcmp(gpu,"enabled")) {
+ hw->hw_gpu_enabled = 1;
+ } else if (!strcmp(gpu,"off") || !strcmp(gpu,"disabled")) {
+ hw->hw_gpu_enabled = 0;
+ } else if (!strcmp(gpu,"auto")) {
+ /* Nothing to do */
+ } else {
+ derror("Invalid value for -gpu <mode> parameter: %s\n", gpu);
+ derror("Valid values are: on, off or auto\n");
+ exit(1);
+ }
+ }
+
/* physical memory is now in hw->hw_ramSize */
hw->avd_name = ASTRDUP(avdInfo_getName(avd));