mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-25 07:58:04 +03:00
Provide a trackpad-style on-screen cursor for touch environments (mainly Android), where touching the screen previously jumped the pointer to the touched location (absolute) and SDL hardware cursors are invisible. When enabled, a finger drag moves an arrow cursor relatively, a tap left-clicks (held briefly so polling games detect it), two fingers right-click, and a stationary long press starts a left-button drag. Real mouse motion is ignored (including the spurious startup (0,0) event), and program-driven cursor moves are followed via the internal pointer location instead of warping the OS cursor. The feature is disabled by default and enabled via the -virtualpointer command-line option, the virtualpointer profile setting, or the "Virtual mouse pointer" toggle in the Android launcher (persisted in SharedPreferences and passed to the engine as -virtualpointer). The gesture handling lives in event.c and the cursor rendering in the new platform-independent virtual_pointer module, so it works on any touch target. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>