aboutsummaryrefslogtreecommitdiffstats
path: root/android/main-ui.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-01-16 01:42:37 +0100
committerDavid 'Digit' Turner <digit@android.com>2011-01-18 20:53:34 +0100
commit97d795c955f8d261a0a5294d49ea06d5a473ed03 (patch)
treec38306a988e9cbe8514827efd62e92cd7021c8fa /android/main-ui.c
parent9cf288a4a03f6745a81b35e8022aab3d1d5f2247 (diff)
downloadexternal_qemu-97d795c955f8d261a0a5294d49ea06d5a473ed03.zip
external_qemu-97d795c955f8d261a0a5294d49ea06d5a473ed03.tar.gz
external_qemu-97d795c955f8d261a0a5294d49ea06d5a473ed03.tar.bz2
Add support for 32-bit framebuffers.
This modifies the emulator so support 32-bit framebuffers. You can create such a frame-buffer using one of these methods: - Add a "bpp 32" line to the "display" element of your skin - Use the new 'magic' skin option format: e.g. -skin 320x480x32 Note that the result will be hideous since the kernel driver still thinks the hardware is only 16-bits. This will be addressed in a later patch to hw/goldfish_fb.c and to the kernel driver ($KERNEL/drivers/video/goldfishfb.c) Change-Id: I0fc700c4a4cb8521076605324e15ed34e5d01136
Diffstat (limited to 'android/main-ui.c')
-rw-r--r--android/main-ui.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/android/main-ui.c b/android/main-ui.c
index 927debb..a48c0fc 100644
--- a/android/main-ui.c
+++ b/android/main-ui.c
@@ -375,8 +375,13 @@ void init_skinned_ui(const char *path, const char *name, AndroidOptions* opts)
if(x && isdigit(x[1])) {
int width = atoi(name);
int height = atoi(x + 1);
- sprintf(tmp,"display {\n width %d\n height %d\n}\n",
- width, height);
+ int bpp = 16;
+ char* y = strchr(x+1, 'x');
+ if (y && isdigit(y[1])) {
+ bpp = atoi(y+1);
+ }
+ sprintf(tmp,"display {\n width %d\n height %d\n bpp %d}\n",
+ width, height,bpp);
aconfig_load(root, strdup(tmp));
path = ":";
goto found_a_skin;