[Title] added -disable-skin qemu startup arg
authorgiwoong.kim <giwoong.kim@samsung.com>
Wed, 4 Apr 2012 03:37:34 +0000 (12:37 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Wed, 4 Apr 2012 03:37:34 +0000 (12:37 +0900)
[Type]
[Module] Emulator
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

qemu-options.hx
tizen/src/emul_state.c
tizen/src/emul_state.h
tizen/src/emulator.c
vl.c

index b740a43..8def96c 100644 (file)
@@ -2632,9 +2632,19 @@ DEF("max-touch-point", HAS_ARG, QEMU_OPTION_max_touch_point, \
     QEMU_ARCH_ALL)
 STEXI
 @item -max-touch-point @var{max_count}
+@findex -max-touch-point
 Use @var{max_count} as Integer
 ETEXI
 
+DEF("disable-skin", 0, QEMU_OPTION_disable_skin, \
+    "-disable-skin\n"
+    "                do not start with java skin process\n",
+    QEMU_ARCH_ALL)
+STEXI
+@item -disable-skin
+@findex -disable-skin
+ETEXI
+
 HXCOMM This is the last statement. Insert new options before this line!
 STEXI
 @end table
index 285c39a..a455bdb 100644 (file)
@@ -45,6 +45,16 @@ MULTI_DEBUG_CHANNEL(qemu, emul_state);
 static EmulatorConfigInfo _emul_info;
 static EmulatorConfigState _emul_state;
 
+/* start_skin_client or not ? */
+void set_emul_skin_enable(int enable)
+{
+    _emul_info.skin_enable = enable;
+}
+
+int get_emul_skin_enable(void)
+{
+    return _emul_info.skin_enable;
+}
 
 /* current emulator condition */
 int get_emulator_condition(void)
index 8cc561a..adfde8e 100644 (file)
@@ -45,22 +45,20 @@ enum {
     HARD_KEY_VOL_DOWN = 114,
 };
 
+/* keep it consistent with java definition */
 enum {
     MOUSE_DOWN = 1,
     MOUSE_UP = 2,
     MOUSE_DRAG = 3,
 };
 
+/* keep it consistent with java definition */
 enum {
     KEY_PRESSED = 1,
     KEY_RELEASED = 2,
 };
 
-enum {
-    HOST_CAPSLOCK_KEY = 1,
-    HOST_NUMLOCK_KEY = 2,
-};
-
+/* keep it consistent with java definition */
 enum {
     ROTATION_PORTRAIT = 0,
     ROTATION_LANDSCAPE = 1,
@@ -68,12 +66,16 @@ enum {
     ROTATION_REVERSE_LANDSCAPE = 3,
 };
 
+enum {
+    HOST_CAPSLOCK_KEY = 1,
+    HOST_NUMLOCK_KEY = 2,
+};
+
 
 typedef  struct EmulatorConfigInfo {
-    char emulator_name[256]; //TODO:
+    int skin_enable;
     int lcd_size_w;
     int lcd_size_h;
-    int guest_dpi; //not used yet
     int sdl_bpp;
     int max_touch_point;
     //TODO:
@@ -91,6 +93,7 @@ typedef struct EmulatorConfigState {
 
 
 /* setter */
+void set_emul_skin_enable(int enable);
 void set_emul_lcd_size(int width, int height);
 void set_emul_win_scale(double scale);
 void set_emul_sdl_bpp(int bpp);
@@ -101,6 +104,7 @@ void set_emul_caps_lock_state(int state);
 void set_emul_num_lock_state(int state);
 
 /* getter */
+int get_emul_skin_enable(void);
 int get_emul_lcd_width(void);
 int get_emul_lcd_height(void);
 double get_emul_win_scale(void);
index 976120f..c1f94ae 100644 (file)
@@ -91,11 +91,12 @@ static void construct_main_window(int skin_argc, char* skin_argv[], int qemu_arg
     INFO("construct main window\n");
 
     start_skin_server( skin_argc, skin_argv, qemu_argc, qemu_argv );
-#if 1
-    if ( 0 > start_skin_client(skin_argc, skin_argv) ) {
-        exit( -1 );
+
+    if (get_emul_skin_enable() == 1) { //check for debugging, etc..
+        if ( 0 > start_skin_client(skin_argc, skin_argv) ) {
+            exit( -1 );
+        }
     }
-#endif
 
     set_emul_caps_lock_state(0);
     set_emul_num_lock_state(0);
diff --git a/vl.c b/vl.c
index c91ab59..d609f0f 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -194,6 +194,7 @@ int qemu_main(int argc, char **argv, char **envp);
 #ifdef CONFIG_MARU
 #define VIRTIOGL_DEV_NAME "virtio-gl-pci"
 extern int tizen_base_port;
+int skin_disabled = 0;
 #endif
 
 static const char *data_dir;
@@ -3171,7 +3172,10 @@ int main(int argc, char **argv, char **envp)
                     int cnt = atoi(optarg);
                     fprintf(stderr, "maxTouchPoint:%d\n", cnt);
                     set_emul_max_touch_point(cnt);
+                    break;
                 }
+            case QEMU_OPTION_disable_skin:
+                skin_disabled = 1;
                 break;
 #endif
             default:
@@ -3551,6 +3555,13 @@ int main(int argc, char **argv, char **envp)
 #if defined(CONFIG_MARU)
             /* use tizen qemu sdl */
             maruskin_display_init(ds);
+
+            if (skin_disabled == 1) {
+                //do not start skin client process
+                set_emul_skin_enable(0);
+            } else {
+                set_emul_skin_enable(1);
+            }
 #else
             sdl_display_init(ds, full_screen, no_frame);
 #endif