From: SeokYeon Hwang Date: Tue, 17 Nov 2015 08:37:38 +0000 (+0900) Subject: emulator: use cocoa UI as a default X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~156 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb35cc7e30bf6593bed3e0ebad6c60adc0feda26;p=sdk%2Femulator%2Fqemu.git emulator: use cocoa UI as a default Use cocoa UI as a default when a user wants to use a default console provided by QEMU. It is mostly used with non-tizen disk images. Change-Id: Ia9377f032bfdc79344a9b5e3c0163478c24d4640 Signed-off-by: SeokYeon Hwang --- diff --git a/tizen/emulator_configure.sh b/tizen/emulator_configure.sh index cdd33abf48..045e054c88 100755 --- a/tizen/emulator_configure.sh +++ b/tizen/emulator_configure.sh @@ -174,8 +174,7 @@ CONFIGURE_APPEND=" --extra-cflags=-Wno-error=deprecated-declarations --extra-ldflags=-lstdc++ --audio-drv-list=coreaudio - --disable-cocoa - --disable-sdl + --enable-cocoa --enable-hax $CONFIGURE_APPEND " diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index 307a1e2f88..8d85458892 100644 --- a/tizen/src/emulator.c +++ b/tizen/src/emulator.c @@ -294,8 +294,11 @@ void start_skin(bool skin_enabled) } #endif +#ifdef CONFIG_COCOA +int cocoa_main(int argc, const char * argv[]); +#else int qemu_main(int argc, char **argv, char **envp); -int legacy_emulator_main(int argc, char **argv, char **envp); +#endif static int emulator_main(int argc, char *argv[], char **envp) { @@ -393,7 +396,11 @@ static int emulator_main(int argc, char *argv[], char **envp) print_options_info(); LOG_INFO("qemu main start...\n"); +#ifdef CONFIG_COCOA + cocoa_main(_qemu_argc, (const char **)_qemu_argv); +#else qemu_main(_qemu_argc, _qemu_argv, envp); +#endif return 0; } diff --git a/ui/cocoa.m b/ui/cocoa.m index 334e6f6667..fabb98c7b4 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1127,6 +1127,10 @@ QemuCocoaView *cocoaView; @end +#ifdef CONFIG_MARU +int cocoa_main (int argc, const char * argv[]); +#define main cocoa_main +#endif int main (int argc, const char * argv[]) { @@ -1144,6 +1148,11 @@ int main (int argc, const char * argv[]) { opt++; } if (!strcmp(opt, "-h") || !strcmp(opt, "-help") || +#ifdef CONFIG_MARU + // XXX: we assume that a user do not want to use cocoa UI + // if -display is specified + !strcmp(opt, "-display") || +#endif !strcmp(opt, "-vnc") || !strcmp(opt, "-nographic") || !strcmp(opt, "-version") ||