Previous Thread
Next Thread
Print Thread
Mouse capturing behavior in different OS #114909 03/23/19 11:11 PM
Joined: May 2007
Posts: 548
M
mizapf Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: May 2007
Posts: 548
I'm typically using Linux, and so I am using the SDL system and know about the options like "-mouse". However, Windows users reported me that mouse capturing always happens when they start MAME with the Geneve driver (which has a mouse emulation).

So I tried to run MAME (0.207) in Windows 10, to find that

- The mouse is captured (mouse pointer disappearing) as soon as the emulation starts.
- You can only release the mouse with the Windows key (or by stopping MAME).
- The mame.ini option "mouse" and the command line option "-mouse" have no effect. Compared to the behavior of the SDL system in Linux, they behave as if they were stuck to 1.

Did I overlook something, or is the capturing in Windows (and the ineffectivity of the "mouse" option) an expected behavior?

Re: Mouse capturing behavior in different OS [Re: mizapf] #114910 03/23/19 11:37 PM
Joined: Feb 2004
Posts: 2,093
Vas Crabb Online Content
Very Senior Member
Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,093
If you have `-mouse_device mouse` set it will capture the mouse if the emulated system has mouse inputs whether `-mouse` is set or not. That should behave the same way on SDL and Windows.

edit: just checked defaults - `-mouse_device mouse` is set by default. Use `-mouse_device keyboard` or something to suppress automatic mouse capture when the emulated system has mouse inputs.

Last edited by Vas Crabb; 03/23/19 11:39 PM.
Re: Mouse capturing behavior in different OS [Re: mizapf] #114918 03/24/19 12:44 PM
Joined: May 2007
Posts: 548
M
mizapf Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: May 2007
Posts: 548
The behavior seems to differ between Linux and Windows; have a look at http://www.mizapf.eu/files/mouse.mp4 , a screen recording I did under Linux.

mame.ini contains the settings
Code
mouse        0
...
mouse_device mouse


When I add "-mouse" to the command line (or set "mouse 1" in mame.ini), the mouse is captured (no more desktop pointer) and the values appear as shown above.

Setting "-mouse_device keyboard" makes the emulation ignore all mouse input, unless I use "-mouse" in the command line, in which case everything acts as before, including captured pointer.

I guess that the setting "-mouse_device keyboard" is intended to suppress all mouse input until the emulation is stopped, but it would be more helpful if we had a "release key" (on the partial keyboard), similar to VirtualBox. Just a suggestion, I don't know whether this is doable.

Re: Mouse capturing behavior in different OS [Re: mizapf] #114919 03/24/19 01:28 PM
Joined: Feb 2004
Posts: 2,093
Vas Crabb Online Content
Very Senior Member
Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,093
I'm in the process of re-working mouse input to better support multi-touch screens and other stuff. Friendlier capture/release behaviour is one of the "nice-to-have" things on my list of stuff to address.

Re: Mouse capturing behavior in different OS [Re: mizapf] #114920 03/24/19 07:02 PM
Joined: Mar 2001
Posts: 16,389
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,389
The SDL behavior is as designed. That's a deliberate choice to be friendlier than what the Windows version does (which used to cause people to power off their computer to get the mouse pointer back), and there (used to be?) some key you could press to force the Windows behavior if you're into that sort of thing. I personally think windowed-mode emulators should never capture the pointer without the user requesting it.

Re: Mouse capturing behavior in different OS [Re: mizapf] #114926 03/25/19 08:01 PM
Joined: May 2007
Posts: 548
M
mizapf Offline OP
Senior Member
OP Offline
Senior Member
M
Joined: May 2007
Posts: 548
Pressing the "Windows key" (which raises the start menu) helps to regain the mouse pointer - at least in windowed mode, I did not test fullscreen mode.

Got an idea ... what about an OSD option capture/release?

Re: Mouse capturing behavior in different OS [Re: mizapf] #114927 03/25/19 08:48 PM
Joined: Mar 2001
Posts: 16,389
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,389
In fullscreen mode there's no need to regain the mouse pointer since the emulation is the only thing you can click on smile

Re: Mouse capturing behavior in different OS [Re: mizapf] #114929 03/26/19 03:30 AM
Joined: Aug 2002
Posts: 354
H
Heihachi_73 Offline
Senior Member
Offline
Senior Member
H
Joined: Aug 2002
Posts: 354
Actually there is one thing where a mouse pointer is required beyond the game screen - clickable artwork. Currently it is only possible to see what you are doing by pressing tab every so often to show where the cursor is, otherwise it works fine; the cursor is there and you can click on the artwork, but you can't see where it is.

I might have asked it in the shout box ages ago but I have long forgotten, but is there a way to get mouse-based (or touchscreen etc.) games to interact with artwork without the crosshair being confined to the game screen? The crosshair is limited to the game's screen boundaries but the internal (and invisible) UI mouse is still free to roam the artwork area and click on things. The current way works well with a touchscreen but with a mouse it isn't exactly the best setup when it comes to having interactive artwork as well as requiring the mouse for the game itself.

If anyone wants to test a slot game (yeah, one of those...) with this type of touchscreen+layout design without having to set one up, try magimaska (make sure the mouse is enabled in MAME, of course e.g. "mame magimaska -mouse"). The game is playable despite the MNW flag and will not crash - if you get a coin diverter error, just press M twice (open and close the main door) to continue playing/feeding the machine. The random coin diverter errors are the only reason this particular game has the MNW flag.


Who's Online Now
0 registered members (), 98 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,721
Posts114,624
Members4,873
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3