Joystick input hook

More
2 years 1 day ago #1 by henrichsmith
Joystick input hook was created by henrichsmith
hi
I need to intercep and disable joystick input from a game, I was wonder if I can use a modified version of reshade for doing that.
If someone can point me in the right direction it will be very useful for me.
thanks
regards

Please Log in or Create an account to join the conversation.

More
2 years 1 day ago #2 by crosire
Replied by crosire on topic Joystick input hook
ReShade does neither hook XInput nor DirectInput, so there is nothing in there that would help your case. You could use the hooking system of ReShade to code such hooks of course (since ReShade is open source). But that obviously requires good programming skils and a basic understanding of how hooks work.

Please Log in or Create an account to join the conversation.

More
2 years 21 hours ago #3 by henrichsmith
Replied by henrichsmith on topic Joystick input hook

crosire wrote: ReShade does neither hook XInput nor DirectInput, so there is nothing in there that would help your case. You could use the hooking system of ReShade to code such hooks of course (since ReShade is open source). But that obviously requires good programming skils and a basic understanding of how hooks work.


Thanks
I ve looked in the code and I ve seen in input.cpp a function called handle_window_message (that discard input when reshade gui is displayed)
so I was thinking of catching RIM_TYPEHID events from there but in fact it is more complicated than expected
I will try a little more, thanks again for your advice if someone has others they are welcome
regards

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #4 by TreyM
Replied by TreyM on topic Joystick input hook
Seems like a lot of work for a simple joystick input. Just get something to remap joystick key-combo to a keyboard input. I don't see any real reason to go hacking around on reshade source code for something so simple.

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #5 by henrichsmith
Replied by henrichsmith on topic Joystick input hook
No the problem is the exact opposite, I want to completly exclude the joystick input.
The game is a unity game and the input devices are completly mixed up (u can use keyboard joystic joypad at the same time), no controller settings ingame at all
but I would like to exclude joystick.
The "hacking" itself it is not so complex I managed to intercept hid messages and return 1 for ignore them but the joystick still works.
There is certanly something I don't understand in comunication chain or in wndproc (peekmessage behaviour).
regards

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #6 by henrichsmith
Replied by henrichsmith on topic Joystick input hook
hey where have the posts gone?
I mean the ones in which I talk to that wise guy tojar
Everybody could have learned something to that.

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #7 by crosire
Replied by crosire on topic Joystick input hook
They have disappeared as they were breaking multiple forum rules.

Please Log in or Create an account to join the conversation.