MCPcopy Create free account
hub / github.com/diasurgical/devilution / handle_touch

Function handle_touch

SourceX/controls/touch.cpp:363–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361namespace dvl {
362
363void handle_touch(SDL_Event *event, int current_mouse_x, int current_mouse_y)
364{
365 mouse_x = current_mouse_x;
366 mouse_y = current_mouse_y;
367
368 if (!touch_initialized) {
369 init_touch();
370 touch_initialized = true;
371 }
372 preprocess_events(event);
373 if (event->type == SDL_FINGERDOWN || event->type == SDL_FINGERUP || event->type == SDL_FINGERMOTION) {
374 event->type = SDL_USEREVENT;
375 event->user.code = -1; // ensure this event is ignored;
376 }
377}
378
379void finish_simulated_mouse_clicks(int current_mouse_x, int current_mouse_y)
380{

Callers 1

PeekMessageAFunction · 0.85

Calls 2

init_touchFunction · 0.85
preprocess_eventsFunction · 0.85

Tested by

no test coverage detected