Previous Thread
Next Thread
Print Thread
Using mousewheel as controller? #115143 04/23/19 04:28 PM
Joined: Feb 2014
Posts: 354
G
Golden Child Offline OP
Senior Member
OP Offline
Senior Member
G
Joined: Feb 2014
Posts: 354
Hi all,

Just wondering if you could use the mousewheel and map it to a controller input.

Re: Using mousewheel as controller? [Re: Golden Child] #115144 04/23/19 04:35 PM
Joined: Apr 2006
Posts: 712
Tafoid Offline
Senior Member
Offline
Senior Member
Joined: Apr 2006
Posts: 712
At least in windows you can. Make sure you have mouse activated (-mouse in command line or mouse 1 line in .ini) and simply hit enter to map the Axis. For me, it comes up as Mouse Z. Unknown how it works with SDL. Tested and works with a game like Tempest pretty well.


Re: Using mousewheel as controller? [Re: Tafoid] #115159 04/24/19 04:42 PM
Joined: Feb 2014
Posts: 354
G
Golden Child Offline OP
Senior Member
OP Offline
Senior Member
G
Joined: Feb 2014
Posts: 354
Unfortunately under Ubuntu, the mousewheel doesn't seem to be mappable. Even if I set a PORT_CODE(MOUSECODE_Z) in the port it comes up as N/A in the control panel.

Re: Using mousewheel as controller? [Re: Golden Child] #115179 04/27/19 03:03 PM
Joined: Mar 2001
Posts: 16,377
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,377
This varies by input driver, and only SDL and RawInput support a wheel at all. RawInput shows it as the Z axis on the mouse as noted. SDL passes the events to the core's machine().ui_input().push_mouse_wheel_event() method, which the user interface responds to but I can't see anyplace else that does.

Last edited by R. Belmont; 04/27/19 03:08 PM.
Re: Using mousewheel as controller? [Re: Golden Child] #115180 04/27/19 03:40 PM
Joined: Feb 2004
Posts: 2,085
Vas Crabb Offline
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,085
With SDL on Mac, I get button events for scroll input - it shows as presses of mouse button 4 or 5 depending on the direction.

Re: Using mousewheel as controller? [Re: Golden Child] #115185 04/28/19 12:23 AM
Joined: Mar 2001
Posts: 16,377
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,377
On my Fedora box the mouse wheel does nothing in MAME as GC indicates. I'll look into that.


Moderated by  R. Belmont 

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