Previous Thread
Next Thread
Print Thread
Using mousewheel as controller? #115143 04/23/19 04:28 PM
Joined: Feb 2014
Posts: 280
G
Golden Child Online Content OP
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 280
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: 708
Tafoid Offline
Senior Member
Offline
Senior Member
Joined: Apr 2006
Posts: 708
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: 280
G
Golden Child Online Content OP
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 280
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,273
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,273
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,055
Vas Crabb Offline
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,055
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,273
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,273
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 (robcfg, mixmaster), 83 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,673
Posts113,788
Members4,852
Most Online418
Aug 14th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3