static int _grab_finger_id = 0;
#define QEMU_MOUSE_PRESSED 1
#define QEMU_MOUSE_RELEASEED 0
-void maru_finger_processing_A(int touch_type, int origin_x, int origin_y, int x, int y)
+void maru_finger_processing_1(int touch_type, int origin_x, int origin_y, int x, int y)
{
MultiTouchState *mts = get_emul_multi_touch_state();
FingerPoint *finger = NULL;
}
}
-void maru_finger_processing_B(int touch_type, int origin_x, int origin_y, int x, int y)
+void maru_finger_processing_2(int touch_type, int origin_x, int origin_y, int x, int y)
{
MultiTouchState *mts = get_emul_multi_touch_state();
FingerPoint *finger = NULL;
int get_multi_touch_enable(void);
FingerPoint *get_finger_point_from_slot(int index);
FingerPoint *get_finger_point_search(int x, int y);
-void maru_finger_processing_A(int touch_type, int origin_x, int origin_y, int x, int y);
-void maru_finger_processing_B(int touch_type, int origin_x, int origin_y, int x, int y);
+void maru_finger_processing_1(int touch_type, int origin_x, int origin_y, int x, int y);
+void maru_finger_processing_2(int touch_type, int origin_x, int origin_y, int x, int y);
int rearrange_finger_points(int lcd_w, int lcd_h, double scale_factor, int rotaton_type);
void clear_finger_slot(void);
void cleanup_multi_touch_state(void);
#ifndef USE_SHM
/* multi-touch */
if (get_emul_multi_touch_state()->multitouch_enable == 1) {
- maru_finger_processing_A(event_type, origin_x, origin_y, x, y);
+ maru_finger_processing_1(event_type, origin_x, origin_y, x, y);
return;
} else if (get_emul_multi_touch_state()->multitouch_enable == 2) {
- maru_finger_processing_B(event_type, origin_x, origin_y, x, y);
+ maru_finger_processing_2(event_type, origin_x, origin_y, x, y);
return;
}
#endif
#ifndef USE_SHM
//is multi-touch mode ?
if (get_emul_max_touch_point() > 1) {
- if (keycode == JAVA_KEYCODE_BIT_CTRL) {
+ int state_mask_temp = state_mask & ~JAVA_KEYCODE_NO_FOCUS;
+
+ if ((keycode == JAVA_KEYCODE_BIT_SHIFT &&
+ state_mask_temp == JAVA_KEYCODE_BIT_CTRL) ||
+ (keycode == JAVA_KEYCODE_BIT_CTRL &&
+ state_mask_temp == JAVA_KEYCODE_BIT_SHIFT))
+ {
if (KEY_PRESSED == event_type) {
- get_emul_multi_touch_state()->multitouch_enable = 1;
- INFO("1)multi-touch enabled = A\n");
- } else if (KEY_RELEASED == event_type) {
- get_emul_multi_touch_state()->multitouch_enable = 0;
- clear_finger_slot();
- INFO("1)multi-touch disabled\n");
- }
- } else if (keycode == (JAVA_KEYCODE_NO_FOCUS | JAVA_KEYCODE_BIT_CTRL)) {
- //release ctrl key when dragging
- if (KEY_RELEASED == event_type) {
- get_emul_multi_touch_state()->multitouch_enable = 0;
- clear_finger_slot();
- INFO("2)multi-touch disabled\n");
+ get_emul_multi_touch_state()->multitouch_enable = 2;
+ INFO("enable multi-touch = mode2\n");
}
- } else if (keycode == (JAVA_KEYCODE_BIT_SHIFT | JAVA_KEYCODE_BIT_CTRL)) {
+ }
+ else if (keycode == JAVA_KEYCODE_BIT_CTRL ||
+ keycode == JAVA_KEYCODE_BIT_SHIFT)
+ {
if (KEY_PRESSED == event_type) {
- get_emul_multi_touch_state()->multitouch_enable = 2;
- INFO("2)multi-touch enabled = B\n");
- } else if (KEY_RELEASED == event_type) {
get_emul_multi_touch_state()->multitouch_enable = 1;
- INFO("2)multi-touch enabled = A\n");
+ INFO("enable multi-touch = mode1\n");
+ } else if (KEY_RELEASED == event_type) {
+ if (state_mask_temp == (JAVA_KEYCODE_BIT_CTRL | JAVA_KEYCODE_BIT_SHIFT)) {
+ get_emul_multi_touch_state()->multitouch_enable = 1;
+ INFO("enabled multi-touch = mode1\'\n");
+ } else {
+ get_emul_multi_touch_state()->multitouch_enable = 0;
+ clear_finger_slot();
+ INFO("disable multi-touch\n");
+ }
}
}
+
}
#endif