libsdl-org / sdl12-compat

An SDL-1.2 compatibility layer that uses SDL 2.0 behind the scenes.
Other
191 stars 40 forks source link

OpenXcom scrolling issue #340

Open th555 opened 2 weeks ago

th555 commented 2 weeks ago

Running the latest OpenXcom built from source, and sdl12-compat 1.2.68, on manjaro, I again encountered this scrolling issue. Quoting from there:

I've found the culprit code to be here:

https://github.com/OpenXcom/OpenXcom/blob/master/src/Geoscape/Globe.cpp#L1609

The calls to filter out mouse motion events doesn't seem to work and the SDL_WarpMouse call adds another motion event to the queue which just floods the queue continuously, which is causing the freeze. Commenting out the SDL_WarpMouse line fixes the issue of course, but once the cursor hits the edges of the window, it stops.

Edit: so reading a few lines further, the actual issue might be with SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE), and not SDL_WarpMouse itself.