STEXI
@end table
ETEXI
+
+DEF("max-touch-point", HAS_ARG, QEMU_OPTION_max_touch_point, \
+ "-max-touch-point [count]\n"
+ " define maximum number of touch point\n",
+ QEMU_ARCH_ALL)
+STEXI
+@item -max-touch-point @var{max_count}
+Use @var{max_count} as Integer
+ETEXI
return _emul_info.sdl_bpp;
}
+/* maximum number of touch point */
+void set_emul_max_touch_point(int cnt)
+{
+ if (cnt <= 0) {
+ cnt = 1;
+ }
+ _emul_info.max_touch_point = cnt;
+}
+
+int get_emul_max_touch_point(void)
+{
+ if (_emul_info.max_touch_point <= 0) {
+ set_emul_max_touch_point(1);
+ }
+ return _emul_info.max_touch_point;
+}
+
/* emulator window scale */
void set_emul_win_scale(double scale_factor)
{
int lcd_size_h;
int guest_dpi; //not used yet
int sdl_bpp;
+ int max_touch_point;
//TODO:
} EmulatorConfigInfo;
void set_emul_lcd_size(int width, int height);
void set_emul_win_scale(double scale);
void set_emul_sdl_bpp(int bpp);
+void set_emul_max_touch_point(int cnt);
void set_emulator_condition(int state);
void set_emul_rotation(short rotation_type);
void set_emul_caps_lock_state(int state);
int get_emul_lcd_height(void);
double get_emul_win_scale(void);
int get_emul_sdl_bpp(void);
+int get_emul_max_touch_point(void);
int get_emulator_condition(void);
short get_emul_rotation(void);
MultiTouchState *get_emul_multi_touch_state(void);
INFO("multi-touch state initialization\n");
mts->multitouch_enable = 0;
- mts->finger_cnt_max = MAX_FINGER_CNT; //temp
+
+ mts->finger_cnt_max = get_emul_max_touch_point();
+ if (mts->finger_cnt_max > MAX_FINGER_CNT) {
+ mts->finger_cnt_max = MAX_FINGER_CNT; //TODO:
+ set_emul_max_touch_point(mts->finger_cnt_max);
+ }
+ INFO("maxTouchPoint=%d\n", get_emul_max_touch_point());
+
mts->finger_cnt = 0;
if (mts->finger_slot != NULL) {
TRACE( "key_event event_type:%d, keycode:%d\n", event_type, keycode );
//is multi-touch mode ?
- if (keycode == JAVA_KEYCODE_BIT_CTRL) {
+ if (keycode == JAVA_KEYCODE_BIT_CTRL && get_emul_max_touch_point() > 1) {
if (KEY_PRESSED == event_type) {
get_emul_multi_touch_state()->multitouch_enable = 1;
INFO("multi-touch enabled\n");
#ifdef CONFIG_MARU
#include "tizen/src/maru_sdl.h"
#include "tizen/src/option.h"
+#include "tizen/src/emul_state.h"
#endif
//#define DEBUG_NET
case QEMU_OPTION_disable_hax:
hax_disabled = 1;
break;
+#ifdef CONFIG_MARU
+ case QEMU_OPTION_max_touch_point:
+ {
+ int cnt = atoi(optarg);
+ fprintf(stderr, "maxTouchPoint:%d\n", cnt);
+ set_emul_max_touch_point(cnt);
+ }
+ break;
+#endif
default:
os_parse_cmd_args(popt->index, optarg);
}