aboutsummaryrefslogtreecommitdiffstats
path: root/vl-android.c
diff options
context:
space:
mode:
authorDavid Turner <digit@android.com>2010-09-10 16:11:22 +0200
committerDavid 'Digit' Turner <digit@android.com>2010-09-13 00:30:35 -0700
commitf52506f4827dfa6da47730c4756a984b05db6dda (patch)
treeb44a329946de9bed358d23c12dbe905999bf14c9 /vl-android.c
parent025c32ffcd9f682cd761a836fe8798738d1648f2 (diff)
downloadexternal_qemu-f52506f4827dfa6da47730c4756a984b05db6dda.zip
external_qemu-f52506f4827dfa6da47730c4756a984b05db6dda.tar.gz
external_qemu-f52506f4827dfa6da47730c4756a984b05db6dda.tar.bz2
upstream: console changes.
Diffstat (limited to 'vl-android.c')
-rw-r--r--vl-android.c53
1 files changed, 2 insertions, 51 deletions
diff --git a/vl-android.c b/vl-android.c
index 0cd5336..b84cd22 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -1678,55 +1678,6 @@ void pcmcia_info(Monitor *mon)
}
/***********************************************************/
-/* register display */
-
-struct DisplayAllocator default_allocator = {
- defaultallocator_create_displaysurface,
- defaultallocator_resize_displaysurface,
- defaultallocator_free_displaysurface
-};
-
-void register_displaystate(DisplayState *ds)
-{
- DisplayState **s;
- s = &display_state;
- while (*s != NULL)
- s = &(*s)->next;
- ds->next = NULL;
- *s = ds;
-}
-
-DisplayState *get_displaystate(void)
-{
- return display_state;
-}
-
-DisplayAllocator *register_displayallocator(DisplayState *ds, DisplayAllocator *da)
-{
- if(ds->allocator == &default_allocator) ds->allocator = da;
- return ds->allocator;
-}
-
-/* dumb display */
-
-static void dumb_display_init(void)
-{
- DisplayState *ds = qemu_mallocz(sizeof(DisplayState));
- ds->allocator = &default_allocator;
- ds->surface = qemu_create_displaysurface(ds, 640, 480);
- register_displaystate(ds);
-}
-
-static void
-android_display_init_from(int width, int height, int rotation, int bpp)
-{
- DisplayState *ds = qemu_mallocz(sizeof(DisplayState));
- ds->allocator = &default_allocator;
- ds->surface = qemu_create_displaysurface(ds, width, height);
- register_displaystate(ds);
-}
-
-/***********************************************************/
/* I/O handling */
typedef struct IOHandlerRecord {
@@ -5352,7 +5303,7 @@ int main(int argc, char **argv, char **envp)
android_display_height, 0,
android_display_bpp);
} else {
- dumb_display_init();
+ ds = get_displaystate(); /* this forces a dumb display init */
}
} else if (android_op_gui) {
/* Resize display from the command line parameters. */
@@ -5368,7 +5319,7 @@ int main(int argc, char **argv, char **envp)
}
/* just use the first displaystate for the moment */
- ds = display_state;
+ ds = display_state = get_displaystate();
if (display_type == DT_DEFAULT) {
#if defined(CONFIG_SDL) || defined(CONFIG_COCOA)