![]() |
![]() |
#1 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,300
|
Find out input.device mouse port
The IND_SETMPORT input.device has a command can be used to pick the mouse port, but there's no matching command to query which port it collects the mouse events from. Is there an alternate way to find the port number used by input.device?
Last edited by BSzili; 13 August 2016 at 13:04. Reason: removed OS4 stuff I found by mistake |
![]() |
![]() |
#2 |
Amiga Nuts!
Join Date: Sep 2006
Location: Le Mayet d'Ecole, 03800, FRANCE
Posts: 176
|
mouse port is port 0, joystick port is port 1 by default. if I remember well ^^)
|
![]() |
![]() |
#3 | |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,028
|
Quote:
Of course it is 99% sure that port 0 is the mouse port, because this is the default and almost nobody changes it. But it is possible to change it and therefore you cannot be 100% sure. Well, you could try to check with lowlevel.library which port has a mouse. But if two mouses are connected, you are lost again. |
|
![]() |
![]() |
#4 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Have a look at gameport.device, it's the device that reads the gameports and feeds the data to input.device, there might be something in there.
|
![]() |
![]() |
#5 |
old chunk of coal
Join Date: Nov 2011
Location: Hungary
Posts: 1,300
|
Thanks for the replies. Lowlevel.library's auto-detection can be a bit cranky at times, which is why I was looking for a way to find out which port input.device listens to. Sending a GPD_ASKCTYPE command to gameport.device units 0 and 1 did the trick, whichever says GPCT_MOUSE is the one used by input device.
|
![]() |
![]() |
#6 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Yep, if the mouse is in a certain position and not moved during the detection routine, it's impossible to tell the difference between it and a standard joystick, so joystick will be assumed.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Input Device Clash | Hungry Horace | support.FS-UAE | 2 | 12 October 2014 23:36 |
Serial port, parallel port, and pipe device mount errors | Samurai_Crow | support.FS-UAE | 4 | 13 March 2014 00:04 |
(ASM, C ) input.device | Asman | Coders. General | 4 | 16 July 2009 10:10 |
Shortcut to swap input port... | mauro72 | support.WinUAE | 1 | 15 May 2009 15:45 |
|
|