| 64 | static DraggingType multi_finger_dragging[TOUCH_PORT_MAX_NUM]; // keep track whether we are currently drag-and-dropping |
| 65 | |
| 66 | static void init_touch(void) |
| 67 | { |
| 68 | for (int port = 0; port < TOUCH_PORT_MAX_NUM; port++) { |
| 69 | for (int i = 0; i < MAX_NUM_FINGERS; i++) { |
| 70 | finger[port][i].id = NO_TOUCH; |
| 71 | } |
| 72 | multi_finger_dragging[port] = DRAG_NONE; |
| 73 | } |
| 74 | |
| 75 | for (int port = 0; port < TOUCH_PORT_MAX_NUM; port++) { |
| 76 | for (int i = 0; i < 2; i++) { |
| 77 | simulated_click_start_time[port][i] = 0; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | SDL_DisplayMode current; |
| 82 | SDL_GetCurrentDisplayMode(0, ¤t); |
| 83 | visible_height = current.h; |
| 84 | visible_width = (current.h * SCREEN_WIDTH) / SCREEN_HEIGHT; |
| 85 | x_borderwidth = (current.w - visible_width) / 2; |
| 86 | y_borderwidth = (current.h - visible_height) / 2; |
| 87 | } |
| 88 | |
| 89 | static void preprocess_events(SDL_Event *event) |
| 90 | { |
no test coverage detected