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: 251
G
Golden Child Offline OP
Senior Member
Golden Child  Offline OP
Senior Member
G
Joined: Feb 2014
Posts: 251
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 Offline
Senior Member
Tafoid  Offline
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: 251
G
Golden Child Offline OP
Senior Member
Golden Child  Offline OP
Senior Member
G
Joined: Feb 2014
Posts: 251
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,206
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,206
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,044
Sydney, Australia
Vas Crabb Online content
Very Senior Member
Vas Crabb  Online Content
Very Senior Member
Joined: Feb 2004
Posts: 2,044
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,206
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,206
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
2 registered members (Dam0, reenigne), 28 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,654
Posts113,414
Members4,846
Most Online324
Dec 20th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.042s Queries: 15 (0.018s) Memory: 5.6236 MB (Peak: 5.8113 MB) Zlib enabled. Server Time: 2019-05-26 06:59:31 UTC