From: giwoong.kim Date: Wed, 25 Jul 2012 11:32:37 +0000 (+0900) Subject: [Title] modified arch define & etc X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1528^2~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a306141f956505772601e6c835305502b653819d;p=sdk%2Femulator%2Fqemu.git [Title] modified arch define & etc [Type] feature [Module] Emulator [Priority] major [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index e2578d06ad..204a011508 100644 --- a/tizen/src/emulator.c +++ b/tizen/src/emulator.c @@ -32,8 +32,9 @@ #include "maru_common.h" #include +#ifdef CONFIG_SDL #include -#include "maru_common.h" +#endif #include "emulator.h" #include "sdb.h" #include "string.h" @@ -49,15 +50,14 @@ #include #include -#if defined( _WIN32) +#if defined(CONFIG_WIN32) #include -#elif defined(__linux__) +#elif defined(CONFIG_LINUX) #include #include #include #include #include - #endif #include "mloop_event.h" @@ -81,16 +81,14 @@ static char** skin_argv = NULL; static int qemu_argc = 0; static char** qemu_argv = NULL; -extern void maruskin_sdl_quit(void); +extern void maru_display_fini(void); void exit_emulator(void) { - cleanup_multi_touch_state(); - mloop_ev_stop(); shutdown_skin_server(); shutdown_guest_server(); - maruskin_sdl_quit(); + maru_display_fini(); } static int check_port_bind_listen(u_int port) @@ -119,7 +117,7 @@ static int check_port_bind_listen(u_int port) INFO( "check port(%d) bind listen ok \n", port); } -#ifdef _WIN32 +#ifdef CONFIG_WIN32 closesocket(s); #else close(s); @@ -393,7 +391,7 @@ void set_image_and_log_path(char* qemu_argv) strcpy(logpath, tizen_target_path); strcat(logpath, LOGS_SUFFIX); -#ifdef _WIN32 +#ifdef CONFIG_WIN32 if(access(g_win32_locale_filename_from_utf8(logpath), R_OK) != 0) { g_mkdir(g_win32_locale_filename_from_utf8(logpath), 0755); } diff --git a/tizen/src/maru_sdl.c b/tizen/src/maru_sdl.c index 54d2289858..ed3bc4ded8 100644 --- a/tizen/src/maru_sdl.c +++ b/tizen/src/maru_sdl.c @@ -456,6 +456,7 @@ void maruskin_sdl_quit(void) /* remove multi-touch finger points */ get_emul_multi_touch_state()->multitouch_enable = 0; clear_finger_slot(); + cleanup_multi_touch_state(); if (sdl_opengl == 1) { glDeleteTextures(1, &texture); diff --git a/tizen/src/skin/maruskin_client.c b/tizen/src/skin/maruskin_client.c index 50e60c4912..4158264214 100644 --- a/tizen/src/skin/maruskin_client.c +++ b/tizen/src/skin/maruskin_client.c @@ -28,6 +28,7 @@ */ +#include "maru_common.h" #include #include #include @@ -39,12 +40,12 @@ #include "sdb.h" #include "debug_ch.h" -#ifdef _WIN32 +#ifdef CONFIG_WIN32 #include "maru_err_table.h" #include #endif -MULTI_DEBUG_CHANNEL(qemu, maruskin_client); +MULTI_DEBUG_CHANNEL(qemu, skin_client); #define SKIN_SERVER_READY_TIME 3 // second @@ -106,7 +107,7 @@ static void* run_skin_client(void* arg) argv ); INFO( "command for swt : %s\n", cmd ); -#ifdef _WIN32 +#ifdef CONFIG_WIN32 //WinExec( cmd, SW_SHOW ); { STARTUPINFO sti = { 0 }; @@ -164,7 +165,7 @@ static void* run_skin_client(void* arg) } } -#else //ifndef _WIN32 +#else //ifndef CONFIG_WIN32 int ret = system(cmd); if (ret == 127) { @@ -206,7 +207,7 @@ int start_skin_client(int argc, char* argv[]) } else { count++; INFO( "sleep for ready. count:%d\n", count ); -#ifdef _WIN32 +#ifdef CONFIG_WIN32 Sleep( SKIN_SERVER_SLEEP_TIME ); #else usleep( 1000 * SKIN_SERVER_SLEEP_TIME ); @@ -249,7 +250,7 @@ int start_simple_client(char* msg) { snprintf(cmd, len, "%s %s %s %s=\"%s\"", JAVA_EXEFILE_PATH, JAVA_EXEOPTION, JAR_SKINFILE_PATH, JAVA_SIMPLEMODE_OPTION, msg); INFO("command for swt : %s\n", cmd); -#ifdef __WIN32 +#ifdef CONFIG_WIN32 ret = WinExec(cmd, SW_SHOW); #else ret = system(cmd); diff --git a/tizen/src/skin/maruskin_server.c b/tizen/src/skin/maruskin_server.c index cb94e976c3..e8187e7c31 100644 --- a/tizen/src/skin/maruskin_server.c +++ b/tizen/src/skin/maruskin_server.c @@ -27,6 +27,14 @@ * */ + +#include "maru_common.h" + +#ifdef CONFIG_DARWIN +//shared memory +#define USE_SHM +#endif + #include #include #include @@ -42,7 +50,7 @@ #include "maruskin_client.h" #include "emulator.h" #include "debug_ch.h" -#ifdef _WIN32 +#ifdef CONFIG_WIN32 #include #include #include @@ -52,7 +60,7 @@ #include #endif -MULTI_DEBUG_CHANNEL( qemu, skin_server ); +MULTI_DEBUG_CHANNEL(qemu, skin_server); #define MAX_REQ_ID 0x7fffffff #define RECV_BUF_SIZE 32 @@ -194,7 +202,7 @@ void shutdown_skin_server( void ) { INFO( "skin client sent normal shutdown response.\n" ); break; } else { -#ifdef _WIN32 +#ifdef CONFIG_WIN32 Sleep( 1 ); // 1ms #else usleep( 1000 ); // 1ms @@ -208,7 +216,7 @@ void shutdown_skin_server( void ) { is_force_close_client = 1; if ( client_sock ) { -#ifdef _WIN32 +#ifdef CONFIG_WIN32 closesocket( client_sock ); #else close( client_sock ); @@ -218,7 +226,7 @@ void shutdown_skin_server( void ) { if ( close_server_socket ) { INFO( "skin client did not send normal shutdown response.\n" ); if ( server_sock ) { -#ifdef _WIN32 +#ifdef CONFIG_WIN32 closesocket( server_sock ); #else close( server_sock ); @@ -253,7 +261,7 @@ static void parse_skinconfig_prop( void ) { memset( skin_config_path, 0, target_path_len + 32 ); strcpy( skin_config_path, tizen_target_path ); -#ifdef _WIN32 +#ifdef CONFIG_WIN32 strcat( skin_config_path, "\\" ); #else strcat( skin_config_path, "/" ); @@ -361,7 +369,7 @@ static void parse_skin_args( void ) { free( arg ); - }else { + } else { ERR( "fail to strdup." ); } @@ -700,7 +708,9 @@ static void* run_skin_server( void* args ) { do_rotation_event( rotation_type ); } - maruskin_sdl_resize(); //send sdl event +#ifndef USE_SHM + maruskin_sdl_resize(); // send sdl event +#endif break; } case RECV_SCREEN_SHOT: { @@ -799,7 +809,7 @@ static void* run_skin_server( void* args ) { cleanup: if ( server_sock ) { -#ifdef _WIN32 +#ifdef CONFIG_WIN32 closesocket( server_sock ); #else close( server_sock ); @@ -1040,7 +1050,7 @@ static void* do_heart_beat( void* args ) { is_force_close_client = 1; if ( client_sock ) { -#ifdef _WIN32 +#ifdef CONFIG_WIN32 closesocket( client_sock ); #else close( client_sock ); @@ -1063,7 +1073,7 @@ static void* do_heart_beat( void* args ) { is_force_close_client = 1; if ( client_sock ) { -#ifdef _WIN32 +#ifdef CONFIG_WIN32 closesocket( client_sock ); #else close( client_sock ); @@ -1072,7 +1082,7 @@ static void* do_heart_beat( void* args ) { stop_server = 1; if ( server_sock ) { -#ifdef _WIN32 +#ifdef CONFIG_WIN32 closesocket( server_sock ); #else close( server_sock );