joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.66k stars 378 forks source link

Mouse not working on macOS 11.1, SDL & SDL2 #2172

Closed hiatsu0 closed 3 years ago

hiatsu0 commented 3 years ago

Is there any alternative settings regarding mouse, as it is does not seem to be recognized correctly: Clicking works (so I suppose mouse capture into dos is successfull) but the pointer does not move. Normal DOSBox.app works just fine on this Mac (but x86 emulated as this is Apple Silicon).

Steps to reproduce the behavior:

  1. Start any game with mouse support, I tried Settlers II Gold Edition
  2. Click on mouse => Click gets recognized by the game (screen changes, sound effect)
  3. Try moving the mouse => pointer does not move

With DOS > Mouse Emulation > Internal Emulation UNCHECKED the game won't even start, giving its own error about mouse driver not being present.

With emulation CHECKED, these messages come up when starting the game. Unsure if errors or just info, but says something about COM1-port: https://drive.google.com/file/d/1krHJ9x427o5EPWlIy1izJ-FrSg_T1KZ5/view?usp=sharing Edit: The messages appear to be the same when using normal dosbox, but with it the mouse works: https://drive.google.com/file/d/1X4xX_5I9vMla19QBr6GNVU-O2kx81IGt/view?usp=sharing

Environment:

Wengier commented 3 years ago

@hiatsu0 Thanks for reporting! Have you tried "Capture mouse" option from the "Main" menu? When I start the game and click this menu option, the mouse will move (although I am testing in Windows). Alternatively, you can check the "Autolock mouse" option (which can also be set with "autolock=true" from the config file) before starting the game, and it will probably also help.

Hope this helps.

hiatsu0 commented 3 years ago

Thanks for the suggestion, "Capture mouse" does indeed make the pointer move! I thought that was already happening because the clicks were recognized by the game.

There's a tiny issue still that if I capture the mouse after the game has started, the macOS cursor remains visible at the center of the screen but this does not happen always and I could not find repeatable way to introduce it. Seems to not happen when I have the "Autolock mouse" setting on, even if I break and re-engage the lock with Ctrl+F10.

Also, when the mouse is not captured and dosbox-x is running the game in a window (instead of fullscreen) the macOS cursor disappears already a few dozen pixels before going inside the window. Makes it a bit tricky for example to move the window from the top bar or try and click the top-left corner buttons.

These are really really minor issues though.

Two pointers: https://drive.google.com/file/d/1Q3ZUOlMBF9rs-56QTOSe10Rc3IrMN9Yc/view?usp=sharing