#include "maru_common.h"
#include <stdlib.h>
+#ifdef CONFIG_SDL
#include <SDL.h>
-#include "maru_common.h"
+#endif
#include "emulator.h"
#include "sdb.h"
#include "string.h"
#include <glib.h>
#include <glib/gstdio.h>
-#if defined( _WIN32)
+#if defined(CONFIG_WIN32)
#include <windows.h>
-#elif defined(__linux__)
+#elif defined(CONFIG_LINUX)
#include <linux/version.h>
#include <sys/utsname.h>
#include <sys/sysinfo.h>
#include <sys/ipc.h>
#include <sys/shm.h>
-
#endif
#include "mloop_event.h"
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)
INFO( "check port(%d) bind listen ok \n", port);
}
-#ifdef _WIN32
+#ifdef CONFIG_WIN32
closesocket(s);
#else
close(s);
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);
}
/* 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);
*/
+#include "maru_common.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sdb.h"
#include "debug_ch.h"
-#ifdef _WIN32
+#ifdef CONFIG_WIN32
#include "maru_err_table.h"
#include <windows.h>
#endif
-MULTI_DEBUG_CHANNEL(qemu, maruskin_client);
+MULTI_DEBUG_CHANNEL(qemu, skin_client);
#define SKIN_SERVER_READY_TIME 3 // second
argv );
INFO( "command for swt : %s\n", cmd );
-#ifdef _WIN32
+#ifdef CONFIG_WIN32
//WinExec( cmd, SW_SHOW );
{
STARTUPINFO sti = { 0 };
}
}
-#else //ifndef _WIN32
+#else //ifndef CONFIG_WIN32
int ret = system(cmd);
if (ret == 127) {
} 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 );
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);
*
*/
+
+#include "maru_common.h"
+
+#ifdef CONFIG_DARWIN
+//shared memory
+#define USE_SHM
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "maruskin_client.h"
#include "emulator.h"
#include "debug_ch.h"
-#ifdef _WIN32
+#ifdef CONFIG_WIN32
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <sys/socket.h>
#endif
-MULTI_DEBUG_CHANNEL( qemu, skin_server );
+MULTI_DEBUG_CHANNEL(qemu, skin_server);
#define MAX_REQ_ID 0x7fffffff
#define RECV_BUF_SIZE 32
INFO( "skin client sent normal shutdown response.\n" );
break;
} else {
-#ifdef _WIN32
+#ifdef CONFIG_WIN32
Sleep( 1 ); // 1ms
#else
usleep( 1000 ); // 1ms
is_force_close_client = 1;
if ( client_sock ) {
-#ifdef _WIN32
+#ifdef CONFIG_WIN32
closesocket( client_sock );
#else
close( client_sock );
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 );
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, "/" );
free( arg );
- }else {
+ } else {
ERR( "fail to strdup." );
}
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: {
cleanup:
if ( server_sock ) {
-#ifdef _WIN32
+#ifdef CONFIG_WIN32
closesocket( server_sock );
#else
close( server_sock );
is_force_close_client = 1;
if ( client_sock ) {
-#ifdef _WIN32
+#ifdef CONFIG_WIN32
closesocket( client_sock );
#else
close( client_sock );
is_force_close_client = 1;
if ( client_sock ) {
-#ifdef _WIN32
+#ifdef CONFIG_WIN32
closesocket( client_sock );
#else
close( client_sock );
stop_server = 1;
if ( server_sock ) {
-#ifdef _WIN32
+#ifdef CONFIG_WIN32
closesocket( server_sock );
#else
close( server_sock );