diff options
author | David 'Digit' Turner <digit@android.com> | 2011-02-23 15:57:25 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-02-23 17:05:34 +0100 |
commit | bdb6f2dd35a4c749186e665d55d7b76375d7e71d (patch) | |
tree | 327f76a87735a2276ad2e0ac3572796f6c677aa6 /android/main.c | |
parent | dd90991bb911bc61c885f710a848692b593b72c3 (diff) | |
download | external_qemu-bdb6f2dd35a4c749186e665d55d7b76375d7e71d.zip external_qemu-bdb6f2dd35a4c749186e665d55d7b76375d7e71d.tar.gz external_qemu-bdb6f2dd35a4c749186e665d55d7b76375d7e71d.tar.bz2 |
Remove android/main-ui.c
The differences between android/main.c and android/main-ui.c are now
minimal, so remove the latter source file by moving the corresponding
code into android/main-common.c
Also add a -snapshot-no-time-update core option to implement the
emulator-ui -no-snapshot-update-time option. We're probably going to
clean this up a little in the future, but this is enough for now.
Change-Id: I868bb4e47c3d106ae7436ee3f5b2c0ff5fb6ea5c
Diffstat (limited to 'android/main.c')
-rw-r--r-- | android/main.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/android/main.c b/android/main.c index 40f4b9b..a061ecf 100644 --- a/android/main.c +++ b/android/main.c @@ -55,11 +55,6 @@ #include "android/framebuffer.h" #include "iolooper.h" -#ifdef TARGET_I386 -nand_threshold android_nand_read_threshold; -nand_threshold android_nand_write_threshold; -#endif - AndroidRotation android_framebuffer_rotation; #define STRINGIFY(x) _STRINGIFY(x) @@ -81,10 +76,6 @@ extern int qemu_milli_needed; */ #define DEFAULT_DEVICE_DPI 165 -#if 0 -static int opts->flashkeys; /* forward */ -#endif - #ifdef CONFIG_TRACE extern void start_tracing(void); extern void stop_tracing(void); @@ -148,6 +139,12 @@ int main(int argc, char **argv) exit(1); } +#ifdef _WIN32 + socket_init(); +#endif + + handle_ui_options(opts); + while (argc-- > 1) { opt = (++argv)[0]; @@ -216,6 +213,12 @@ int main(int argc, char **argv) exit(0); } + /* Initialization of UI started with -attach-core should work differently + * than initialization of UI that starts the core. In particular.... + */ + + /* -charmap is incompatible with -attach-core, because particular + * charmap gets set up in the running core. */ if (android_charmap_setup(opts->charmap)) { exit(1); } @@ -413,7 +416,7 @@ int main(int argc, char **argv) { const char* filetype = "file"; - // TODO: This should go to core! + // TODO: This should go to core if (avdInfo_isImageReadOnly(avd, AVD_IMAGE_INITSYSTEM)) filetype = "initfile"; @@ -457,7 +460,7 @@ int main(int argc, char **argv) args[n++] = strdup(tmp); } - // TODO: This should go to core + // TODO: This should go to core if (hw->hw_sdCard != 0) opts->sdcard = (char*) avdInfo_getImageFile(avd, AVD_IMAGE_SDCARD); else if (opts->sdcard) { @@ -514,7 +517,7 @@ int main(int argc, char **argv) D("ignoring redundant option(s) '-no-snapshot-load' and/or '-no-snapshot-save' implied by '-no-snapshot'"); } if (opts->no_snapshot_update_time) { - android_snapshot_update_time = 0; + args[n++] = "-snapshot-no-time-update"; } } else if (opts->snapshot || opts->snapstorage) { dwarning("option '-no-snapstorage' overrides '-snapshot' and '-snapstorage', " @@ -870,5 +873,10 @@ int main(int argc, char **argv) /* Setup SDL UI just before calling the code */ init_sdl_ui(skinConfig, skinPath, opts); + if (attach_ui_to_core(opts) < 0) { + derror("Can't attach to core!"); + exit(1); + } + return qemu_main(n, args); } |