Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flycast- dual mouse / lightgun button assignment problem on 2nd mouse/gun #12417

Open
benclau opened this issue May 19, 2021 · 12 comments
Open

Comments

@benclau
Copy link

benclau commented May 19, 2021

First and foremost consider this:

  • Only RetroArch bugs should be filed here. Not core bugs or game bugs
  • This is not a forum or a help section, this is strictly developer oriented

Description

While playing lightgun games with Flycast core, i am able to map buttons on the 2nd lightgun (Sinden Lightgun) in the general INPUT menu but it is not recognize in the game.

Expected behavior

With lightgun #1 in port 1, every buttons can be mapped in retroarch general INPUT menu AND they are recognize ingame. This is not the case for the second Lightgun in port 2.

Actual behavior

Lightgun #1 work #1. I can map trigger, reload, start and select button as i wish.
Lightgun #2 aiming is ok using the proper mouse index. Trigger and reload are ok only if i map those buttons directly in the lightgun software/driver using left/right mouse buttons respectively. Other mapped buttons in general INPUT cannot be recognized (probably any other buttons as well)

Steps to reproduce the bug

1- In Retroarch, load Flycast core
2- in Retroarch general INPUT, set # maximum users to 2
3- Port 1: use proper mouse index
4- Port 1: map GUN Trigger, GUN Reload, GUN Start and GUN Select
5- Port 2: use proper mouse index
6- Port 2: map GUN Trigger, GUN Reload, GUN Start and GUN Select
7- Start game (ex. NAOMI HOTD2)
8- Quick menu
9- Select CONTROLS
10- change port 1 to Lightgun and port 2 to Lightgun
11- Lightgun 1 work normally. Lightgun 2 aiming is ok but buttons are not recognize.
12- alternative solution for Trigger and reload on port 2: in Lightgun driver/software, select Left mouse button for trigger, right mouse button for reload. This will work even if no mapping are set in Retroarch general INPUT port 2 menu.

Bisect Results

Version/Commit

You can find this information under Information/System Information

  • RetroArch: 1.9.3

Environment information

  • OS: Windows
  • Compiler: original build from Retroarch site
@markwkidd
Copy link
Contributor

There have been some improvements to the input mapping code in the latest nightly version. Could you download the nightly and confirm that this issue still exists? And if so, would you be willing to test another core?

I have been helping improve lightgun support in RetroArch. Mostly, I work on the mame2003-plus core, including its lightgun support in the core.

I can't help troubleshoot Flycast very much, but if you are on the latest RetroArch and you also can't get both guns working in Windows with mame2003-plus, I may be able to help you.

@benclau
Copy link
Author

benclau commented Jun 22, 2021

Hi,

Ok i will check tomorrow if there’s any improvement with it.

I’ll get back to you with the results.

Bye.
benclau

@benclau
Copy link
Author

benclau commented Jun 25, 2021

Hi,

Unfortunately, there is no improvements with the latest nightly version. Mapping of port 2 lightgun buttons are not functionnal. Pointer works ok with the right mouse index. Is it a RA related problem or Flycast core's?

@markwkidd
Copy link
Contributor

I also would like to make sure it's not a core issue. Would you be willing to set up mame2003-plus and a lightgun game such as Area51?

That core, when used with udev or xinput as the input driver, does definitely support two guns. Note that you need to set the "xy device" core option to "lightgun".

@benclau
Copy link
Author

benclau commented Jun 27, 2021

OK both guns work fine with mame2003-plus core. However, button mapping of the 2nd gun doesn't work in the RA input menu but is working in the mame menu. In the RA CONTROLS specific menu, even if i put NONE in the port 2 gun, Gun 2 is still working fine. I think this core doesn't (or partially) use RA inputs.

Feel free to ask for other specific tests.
Bye.

@markwkidd
Copy link
Contributor

When you map the second gun in mame2003-plus using the MAME menu, what does the MAME menu label the trigger? Is it something like "Gun2 Trigger"?

@markwkidd
Copy link
Contributor

One more test, could you see if there is any difference between the raw input driver and the xinput driver?

@benclau
Copy link
Author

benclau commented Jun 27, 2021

Gun2 Trigger YES

In the DRIVER section of RA, i don't have xinput. only RAW, Dinput and SDL2

In RA INPUT section, only Gun1 Trigger and Reload are needed. If you don't map them in RA, it will not work. All other button mapping are recognize via mame menu.

No need to map buttons in RA for Gun2 as they are not recognize. Button mapping works fine in mame menu.

@markwkidd
Copy link
Contributor

markwkidd commented Jun 27, 2021 via email

@benclau
Copy link
Author

benclau commented Jun 27, 2021

Dinput and SDL2 don't work. Only RAW with the correct mouse index. These mouse index tend to change. Would be great if we could select port 1 and 2 with permanent HID instead.

@markwkidd
Copy link
Contributor

markwkidd commented Jun 27, 2021 via email

@OctopusButtons
Copy link

OctopusButtons commented Aug 19, 2021

I’m on RA 1.9.7 on Mac (Intel build) and the mouse control bindings seem to be ignored, which seems related to this thread. It’s as if Mouse button 1 is hard coded to lightgun trigger, even when I rebind it in the RA menu (and the menu accepts the rebind) the rebound button doesn’t do anything.

  • I can disable the Gun Trigger: Mouse1 by binding it to something else (like a keyboard key or controller button), but the something else doesn’t work, nothing happens when pressing that input. The menu accepts it, but the button doesn’t work, and the original Mouse click still works to fire even when it’s deleted from the bind menu,
  • The only thing that works when bound to lightgun trigger is Mouse button 1.
  • It only fires a bullet in Time Crisis if it’s Mouse 1, no other button will work even when the menu says it’s bound, while the menu binding interface appears to be working normally.
  • Manually setting the binds in the CFG file text doesn’t fix it either, RA (or the core?) seems to ignore all binds unless it’s Mouse 1.

Troubleshooting with settings:
Guncon setting in RA:

  • Beetle PSX HW core option for Gun Input Mode is set to "Touchscreen”
  • The touchscreen setting makes it so the mouse must be clicked and dragged to register any spatial movement in the game, instead of taking the normal mouse movement input. This seems like a separate issue, but the commonality is mouse input not really working right.
  • When I change Gun Input Mode to "Light Gun", I get no mouse movement input working no matter what. Crosshair cursor doesn't move.
  • That's with GunCon set as the controller type.
  • Either way, if I bind a keyboard key or controller button to Gun Trigger (either in RA menu or via manual cfg), those buttons won’t do anything.
  • If I delete the Gun Trigger and Gun Reload bindings in RA Port 1 Controls (i.e. Function + Backspace on Mac in the RA menu to clear the bind to “- - -“), the mouse buttons still work to fire.
  • And I know my mouse is generally working because RA correctly accepts control menu rebinds to Mouse1 (left mouse click) and Mouse2 (right mouse click). And functionality works fine in other apps.

I tried Mario Paint in BSNES Performance to test if it was core specific to PSX Beetle, but in Mario Paint there’s no mouse movement at all. Earlier RA versions had a similar issue (somewhere around version 1.9.0), but then Mario Paint worked with computer mouse after someone reported fixing a bug, but now it’s back to nothing.

(I searched the RA documentation but I don’t see what “Mouse Index” means or how to know what the correct "Mouse Index" setting is, so I don’t know how to test if that's part of the problem. I don’t think that’s the problem because the mouse does work for some inputs, but only if it’s Gun Trigger = Mouse1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants