VOGONS


First post, by SeppWinkler

User metadata
Rank Newbie
Rank
Newbie

Dear all,

I would like to refresh this theme, because I cant find any solution now on internet. Is there any utility for Windows 10, that can disable mouse Y axis in SDL game. No one solution from internet and AI is working for me. AHK scripts doesnt work, utilities recomended by AI doesnt work. Simple nothing. But I think it must has a solution 😉 Could you recommend something? I am big fan of Wolf 3d games and mods and lot of them are in SDL source port. Hacked SDL.dll doesnt work.

Thank you very much for any hint.

Sepp

Reply 1 of 1, by MagefromAntares

User metadata
Rank Member
Rank
Member

Hi,

I don't think there is a one size fits all solution for this available on Windows, for example SDL can be even statically linked into the executable if the developers choose it.

Back in the 90s I once saw a PS/2 mouse that had a Lock X and Lock Y toggle, it was used by someone for CAD work, haven't seen anything similar in USB format however.

I have heard that there is a "CursorAxisLocker" and "MouseAxisLocker" available for Windows, however I personally didn't used either, so I don't know how good or legit those software are, or if they are capable of working with SDL.

As all Wolfenstein 3D ports should be open sourced (unless a clean reimplementation of the whole engine), if you have a basic familiarity with C, it is a somewhat involved, but possible option to modify all SDL mouse function calls and event handling to simply ignore the y-axis and recompile the given source port, the SDL mouse interface is quite straightforward(Generally for functions the second argument is a pointer to an int(or in case of SDL3 float) variable which will be filled with the relative, window relative or global mouse y position, if events are used the it is in a structure called "SDL_MouseMotionEvent" I think the fields are called the same in all SDL versions x,y,xrel,yrel, the type changed between versions but zero is zero in two's complement whether it is a 16-bit or 32-bit integer 😀 ), so a basic knowledge of C should be enough.

"A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it." - Dune