alexbatalov / fallout1-ce

Fallout for modern operating systems
Other
2.18k stars 150 forks source link

Disable SDL2 conversion of touch->mouse and mouse->touch on all platforms not just iOS/Android #176

Open hippydave opened 5 months ago

hippydave commented 5 months ago

By default, SDL2 simulates mouse events from real touch input, and simulates touch events from real mouse input. This project doesn't require either of those, because it handles both touch and mouse inputs itself.

The existing code specifically disables both these simulation features when the platform is iOS, and also when the platform is Android. This likely covers most touchscreen gadgets being used, but when run on a different platform with a touchscreen (in my case, a Nintendo Switch running Linux), the touchscreen events are duplicated as simulated mouse events, leading to the mouse cursor jumping after a movement is finished, as I created an issue about.

I'm happy to be corrected if I'm wrong, but I can't see any downside to disabling these SDL2 features for all platforms, simulation of touch or mouse never being required because the game handles both. Let me know if anything needs improving, ty.