Jump to content
Download Section Back Up, Navigate the Right Hand Menu to find files, ignore the 0s

Disable mouse input in game.


nzbsolo

Recommended Posts

Working out the bugs in my cab, I have one of the x-arcade tanksticks (heavily modded). My problem is that the mouse buttons are still on in game.

On some emulators this can cause functions of the emulator to stop or break by bringing up menus, causing the cab to stop.

Does anybody know an elegant solution to disabling the mouse, or remapping the mouse to buttons that would effectively stop the mouse buttons from being able to input?

Link to comment
Share on other sites

Hiding the mouse cursor does not disable its functionality. The peeps at work while professional, bang at the machines like a bunch of angry monkeys.

Emulators like nestopia use the right button to bring up the menu, and break emulation. No bueno.

I'm probably going to have to write a powershell script that disables mouse input at the start of games, then on exit re-enables them.

Didn't want to get all scripty, but what can ya do?

I'll post what I write here if any of you guys want to use it.

Link to comment
Share on other sites

So I figured it out. I had to go the scripting route, since there is no application that will do this for me. I'll post the exact script if anybody wants it. But here is the high level description:

1) Download devcon, it allows for the command-line enabling/disabling of hardware devices in windows.

2) Set the devcon pathing in windows environment so you can run it from command prompt/powershell anywhere (not necessary but it helps with the coding bit).

3) I wrote a script that does a get-process check. It checks for demul, nestopia, and daphne in a loop, waiting for an emulator to start.

4) If one of those emulators is active, it will trigger the devcon to disable the mouse.

5) It will loop for infinity doing a get-process check that recycles every 5 seconds checking if the emulator is still active.

6) If the emulator is no longer active, it will run the re-enable script, enabling the device within windows.

7) It then goes back to search mode, waiting for another emulator to turn on.

The script itself has to run in administrator mode. It also runs without a window or any focus stealing effects (besides at startup which I am working on).

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...