libsdl-org / sdl2-compat

An SDL2 compatibility layer that uses SDL3 behind the scenes.
zlib License
65 stars 17 forks source link

Torchlight does not detect mouse input #151

Open GranMinigun opened 3 months ago

GranMinigun commented 3 months ago

Linux version of Torchlight was built against a prehistoric version of SDL2 (see, e.g., here), so it reads wrong event struct members and fails to retrieve mouse position and button presses properly. It is possible to patch the binary to make it work, but would it make sense to somehow handle that in the compat library?

For those who want to patch the game themselves, file Torchlight.bin.x86_64, 16 572 528 bytes. At AD:6734, replace 0C with 10; at AD:6754, replace 14 with 18; at AD:6758, replace 10 with 14; at AD:68B1, replace 0C with 14; at AD:6912, AD:692E, and AD:6944, replace 0D with 11. Camera zoom via mouse wheel is very slow.