Previous Thread
Next Thread
Print Thread
Using mousewheel as controller? #115143
04/23/19 04:28 PM
04/23/19 04:28 PM
Joined: Feb 2014
Posts: 259
G
Golden Child Offline OP
Senior Member
Golden Child  Offline OP
Senior Member
G
Joined: Feb 2014
Posts: 259
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
04/23/19 04:35 PM
Joined: Apr 2006
Posts: 706
USA
Tafoid Online content
Senior Member
Tafoid  Online Content
Senior Member
Joined: Apr 2006
Posts: 706
USA
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
04/24/19 04:42 PM
Joined: Feb 2014
Posts: 259
G
Golden Child Offline OP
Senior Member
Golden Child  Offline OP
Senior Member
G
Joined: Feb 2014
Posts: 259
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
04/27/19 03:03 PM
Joined: Mar 2001
Posts: 16,235
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,235
USA
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
04/27/19 03:40 PM
Joined: Feb 2004
Posts: 2,051
Sydney, Australia
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,051
Sydney, Australia
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
04/28/19 12:23 AM
Joined: Mar 2001
Posts: 16,235
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,235
USA
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
1 registered members (Olivier Galibert), 146 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,666
Posts113,616
Members4,850
Most Online324
Dec 20th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.026s Queries: 14 (0.010s) Memory: 5.6234 MB (Peak: 5.8114 MB) Zlib enabled. Server Time: 2019-07-23 05:43:30 UTC