From f724961cbe9fd2bd246d16954bbba456f0e0e69b Mon Sep 17 00:00:00 2001 From: "giwoong.kim" Date: Thu, 22 Mar 2012 11:39:00 +0900 Subject: [PATCH] [Title] moved emulator condition field [Type] [Module] Emulator [Priority] [Jira#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- tizen/src/emul_state.c | 12 ++++++++++++ tizen/src/emul_state.h | 7 +++++-- tizen/src/emulator.c | 11 +---------- tizen/src/emulator.h | 4 +--- tizen/src/maru_finger.c | 6 +++--- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/tizen/src/emul_state.c b/tizen/src/emul_state.c index 31b355a..948245d 100644 --- a/tizen/src/emul_state.c +++ b/tizen/src/emul_state.c @@ -39,6 +39,18 @@ MULTI_DEBUG_CHANNEL(qemu, emul_state); static EmulatorConfigInfo _emul_info; static EmulatorConfigState _emul_state; + +/* current emulator condition */ +int get_emulator_condition(void) +{ + return _emul_state.emulator_condition; +} + +void set_emulator_condition(int state) +{ + _emul_state.emulator_condition = state; +} + /* lcd screen size */ void set_emul_lcd_size(int width, int height) { diff --git a/tizen/src/emul_state.h b/tizen/src/emul_state.h index 0624e5c..387086a 100644 --- a/tizen/src/emul_state.h +++ b/tizen/src/emul_state.h @@ -63,14 +63,15 @@ enum { typedef struct EmulatorConfigInfo { - char emulator_name[256]; + char emulator_name[256]; //TODO: int lcd_size_w; int lcd_size_h; - int dpi; + int dpi; //not used yet //TODO: } EmulatorConfigInfo; typedef struct EmulatorConfigState { + int emulator_condition; //TODO : enum double scale_factor; short rotation_type; MultiTouchState qemu_mts; @@ -79,11 +80,13 @@ typedef struct EmulatorConfigState { /* setter */ +void set_emulator_condition(int state); void set_emul_lcd_size(int width, int height); void set_emul_win_scale(double scale); void set_emul_rotation(short rotation_type); /* getter */ +int get_emulator_condition(void); int get_emul_lcd_width(void); int get_emul_lcd_height(void); double get_emul_win_scale(void); diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index 71dec60..55770fe 100644 --- a/tizen/src/emulator.c +++ b/tizen/src/emulator.c @@ -53,6 +53,7 @@ MULTI_DEBUG_CHANNEL(qemu, main); + #define IMAGE_PATH_PREFIX "file=" #define IMAGE_PATH_SUFFIX ",if=virtio" #define SDB_PORT_PREFIX "sdb_port=" @@ -61,19 +62,9 @@ MULTI_DEBUG_CHANNEL(qemu, main); #define MIDBUF 128 int tizen_base_port = 0; -int _emulator_condition = 0; //TODO: char tizen_target_path[MAXLEN] = {0, }; char logpath[MAXLEN] = { 0, }; -int get_emulator_condition(void) -{ - return _emulator_condition; -} - -void set_emulator_condition(int state) -{ - _emulator_condition = state; -} void exit_emulator(void) { diff --git a/tizen/src/emulator.h b/tizen/src/emulator.h index b886b5c..5e57fd4 100644 --- a/tizen/src/emulator.h +++ b/tizen/src/emulator.h @@ -41,10 +41,8 @@ extern char tizen_target_path[MAXLEN]; -int get_emulator_condition(void); -void set_emulator_condition(int state); void exit_emulator(void); void set_image_and_log_path(char *qemu_argv); void get_tizen_port(char* option); -#endif +#endif /* __EMULATOR_H__ */ diff --git a/tizen/src/maru_finger.c b/tizen/src/maru_finger.c index 166f3d2..2cdd43b 100644 --- a/tizen/src/maru_finger.c +++ b/tizen/src/maru_finger.c @@ -207,7 +207,7 @@ int get_multi_touch_enable(void) return get_emul_multi_touch_state()->multitouch_enable; } -static int add_finger_point(int x, int y) +static int _add_finger_point(int x, int y) { MultiTouchState *mts = get_emul_multi_touch_state(); @@ -283,7 +283,7 @@ void maru_finger_processing(int x, int y, int touch_type) if (mts->finger_cnt == 0) { //first finger touch input - if (add_finger_point(x, y) == -1) { + if (_add_finger_point(x, y) == -1) { return; } kbd_mouse_event(x, y, 0, QEMU_MOUSE_PRESSED); @@ -311,7 +311,7 @@ void maru_finger_processing(int x, int y, int touch_type) } else //one more finger { - add_finger_point(x, y) ; + _add_finger_point(x, y) ; kbd_mouse_event(x, y, mts->finger_cnt - 1, QEMU_MOUSE_PRESSED); } -- 2.7.4