amaiorano / vectrexy

A Vectrex emulator written in modern C++
MIT License
50 stars 9 forks source link

support for using mouse as an analog joystick? #4

Open gtoal opened 3 years ago

gtoal commented 3 years ago

Would you consider adding the option to use the mouse as an analog joystick? When the mouse is over the emulated screen, map the mouse position relative to the left/right and top/bottom of the screen to -128/127... freeze the value when the mouse moves out of the emulated display area. Hide the OS mouse cursor when it is over the emulated display area.

The mechanism has been tested in vecx and vide and works acceptably well, and allows emulators to play games that require an analog joystick. (for example http://gtoal.com/vectrex/wangle/wangle02a.bin or http://gtoal.com/vectrex/unblockme/unblockme.bin )

There's an analog joystick test program at http://gtoal.com/vectrex/joystick/

regards,

Graham