[Android] Mouse movement for lightguns is not registered
Mouse movement is not registered when used as a lightgun. I have tested on:
- An Nvidia Shield TV (updated to Nvidia Experience 9.2).
- A Smart TV with Android v7 (32-bit).
Below are the results from the cores I tested on the latest stable RetroArch 1.21.0, with all cores updated as of today.
Mouse used: Genius brand.
Nvidia Shield TV
-
Genesis Plus GX: The crosshair is positioned 1/5 from the left horizontally.
-
T2 Arcade Game:
- Mouse movement not registered.
- Triggers work perfectly but are not customizable.
- Gun Trigger → Mouse 1
- Gun Reload → Mouse 3 (wheel button)
- Pause → Mouse 2
-
Operation Wolf:
- Mouse movement not registered.
- Triggers work but are not customizable.
- Gun Trigger → Mouse 1
-
Nestopia: Crosshair appears in the top-left corner of the screen.
-
Mechanized Attack:
- Mouse movement not registered.
- Triggers work but are not customizable.
- Gun Trigger → Mouse 1 and Mouse 3 (wheel button).
Haier Smart TV
-
Genesis Plus GX: Crosshair is centered (no issue here).
-
T2 Arcade Game:
- Mouse movement not registered.
- Triggers work but are not customizable.
- Gun Trigger → Mouse 1
- Gun Reload → Mouse 3 (wheel button)
- Menu Back Button → Mouse 2
-
Operation Wolf:
- Mouse movement not registered.
- Triggers work but are not customizable.
- Gun Trigger → Mouse 1
-
Nestopia: Crosshair appears in the top-left corner of the screen.
-
Mechanized Attack:
- Mouse movement not registered.
- Triggers work but are not customizable.
- Gun Trigger → Mouse 1 and Mouse 3 (wheel button)
- Menu "Back" Button → Mouse 2
Note: The need of customizable buttons in topic of accessibility and add TURBO FUNCTION to the triggers in the same topic as mostly games are nonstop pressing triggers repeatedly.
Triggers not customizable on Android is something that can be fixed eventually. Does the mouse work in the menu?
It works in menu just fine in Nvidia Shield Tv, left and right buttons as ok and back, in Haier Smart Tv only back is working as right button. Even the mouse pointer in game is working on both Shield Tv and Smart Tv, not sure to mention this or is maybe off topic but activating overlays suchs as keyboards, controllers and tapping buttons dont work as well.
The mouse buttons are wrongly set while mouse left is set to gun trigger on the other hand gun reload might be mouse right button instead is middle wheel button for Genesis Plus GX so switch middle and right buttons is not a bad idea, not sure if this is related to the Genius brand mouse I tested.
Checked, indeed the lightgun is only using the pointer input in the android driver, and not the mouse.
It can be changed, but would need some verification. Are you willing to install a test version? It may be a bit inconvenient, as self-compilations can not be updated over buildbot RetroArch, so it means a removal of the regular RA install. If not, then I will need to find an Android system where mouse can be connected, which may take a bit longer.
I'll test it, this SMART TV Android v7 is 32bits and the SHIELD TV I used to have both 32 and 64 bits then removed the 32 version, both of these in the SHIELD TV have separate install folders, I can't uninstall the 64´s I hope is enough to test just the 32's for this SHIELD TV, so go ahead and link the installers.
Okay, here is one test version as 32-bit apk. After install, use Online Updater to retrieve assets, overlays, core info files, and autoconfig profiles.
Hello, It took a while testing on both devices here are the results:
Shield TV
On the Shield TV, I found that when enabling the mouse as a lightgun, the cursor does not move correctly. Starting from the center of the screen, it only moves about 10% of the total screen area. When sliding the mouse from left to right, it behaves as if sliding from the top-left to the bottom-right. When moving up and down, it barely moves. Additionally, when moving diagonally from the top-right to the bottom-left, the cursor moves to the center and then continues diagonally toward the top-left corner, forming a kind of "V for Vendetta" shape. And moving it viceversa on every case.
Smart TV
On the Smart TV, the mouse cursor behaves the same as on the Shield TV. The difference is that the right mouse button is not mapped to the Pause button, and pressing it makes the Android system mouse cursor appear when the mouse is set to on in the RetroArch's User Interfase menu, two cursors appear, and clicking only responds to the system cursor’s position. At that moment, the RetroArch cursor moves to match, and both cursors align at that point.
Input Suggestions
Swap the middle and right mouse buttons so that the Pause button is assigned to the middle mouse button, as this would be the most comfortable better way to play lightgun games with a mouse.
That's all I remember maybe there are some more details I'm forgetting to post by now.
Thanks for testing. Weird, I'll think of a solution. If you have time, maybe you could try with 1.20.0 (or even 1.19.1), there were some changes in mouse pointer handling recently.
Hello, I tested both versions of RA in the Nvidia Shield TV only, I'll test the Smart TV and post excluyent findings if I find some, the results are posted:
Description:
Testing reveals input/mouse functionality issues in specific lightgun games across RetroArch versions 1.19.1 and 1.20.0. Below are the detailed findings:
RA 1.19.1
-
Operation Wolf:
- Button input works, but "Pause button" doesn't work.
- Mouse movement does not work.
-
T2 Arcade Game:
- No inputs work (including mouse movement).
- Note: This game only supports the Menacer lightgun in Port 2.
-
Mechanized Attack:
- No inputs work (including mouse movement).
RA 1.20.0
-
Operation Wolf:
- Left mouse button input works (including pause button).
-
T2 Arcade Game:
- All mouse button inputs work (Trigger, Reload, Pause).
- Mouse movement does not work.
-
Mechanized Attack:
- Button input works, There is a interesting finding I discovered by chance in Nestopia Core>> Core Options,>> Input set Zapper Device from Lightgun to Mouse and the mouse movement works and the input works too.
More Findings
To bomb both games Mechanized Attack (NES), Operation Wolf (SMS) an extra controller is needed, on Retroarch 1.20.0 onwards is needed 1 extra controller for Mechanized Attack NESTOPIA and 2 extra controllers for Operation Wolf GENESIS PLUS GX, the latter needs a controller fix requiring just an extra controller.
Thank you for checking. There was a mouse conversion that was deactivated recently, but these results confirm restoring it would not fix the issue. Investigation continues.
I've been very pleased testing previous versions of RA, thanks, and found the NESTOPIA core case peculiar, as it allows using the mouse instead of lightgun as a zapper device It seems confusing to provide options to choose between lightgun and mouse - does RA actually support third-party hardware lightguns? The option to use lightguns as mouse and/or touchscreen could be the default configuration, just like when multiple mice are connected in Android (both mice control the same cursor). The NESTOPIA core case is interesting - I suggest using its code, which works perfectly, as a starting point to adapt it to RA in general.
On some platforms, there is support for actual physical lightguns, but it is a rare case, lightgun is usually associated with a secondary mouse-type device. On Android, currently there is no support for distinguishing separate mouse devices, not sure if it is possible at all.
No support for 2 separate cursors for mouse devices in Android indeed, I meant that when a device has both a touchscreen and a mouse connected, it could work as 2 pointing devices so wherever the cursor is left by one device, the other can take over.
As far as I know, RA supports lightgun emulation via touchscreen, and I was suggesting that both features could complement each other like that. Therefore Android does not actually support 2 separate cursors when using more than one mouse; instead, all share the same cursor.
Just a heads up, after some time I could return to this topic, and set up a reasonable test environment using a TV box (32-bit). I can get a minimal amount of movement for the lightgun when checking with the sensor test screen of Remote Retropad, but it is clearly not what is intended so I am still looking into it.
Here is a new test version, according to my tests it does register lightgun input correctly. Triggers/buttons are still not assignable. As now the assets are included, it exceeds the 25MB limit here, link is supposed to work for 6 days from now:
https://filebin.net/t7l7acitzm7kcnl8
Hello there, I've just tested 32-bit build only on both devices, take some time to test it.
1. NVIDIA Shield TV Observations
✅ Good:
- Lightgun-style pointer works well overall.
⚠️ Issues:
- Crosshair Speed: Feels kinda slow. Suggestion: Match system cursor speed.
- Screen Edge Bug:
- When cursor hits right edge → crosshair fragment appears on left edge (functional, registers hits).
- Same occurs when cursor hits bottom edge → fragment appears at top (functional too).
2. Smart TV Observations
⚠️ Shared Issues:
- All above bugs (crosshair speed, edge teleportation) also occur here.
🔴 Critical Bugs:
- OK Button Not Working:
- TV remote/keyboard Enter/OK button doesn’t function in RetroArch.
- Workaround: Manually bind OK to Button A/B in Settings → Input → Bindings.
- Crosshair-System Pointer Sync Failure:
- Crosshair tries to follow the (hidden) system pointer:
- Pressing right mouse button reveals the system pointer, showing:
- Crosshair "teleports" toward system pointer’s position.
- Perfect alignment only near screen center.
- Drifts exponentially toward edges (horizontal/vertical).
- Pressing right mouse button reveals the system pointer, showing:
- Crosshair tries to follow the (hidden) system pointer:
3. Additional Notes
- RetroArch Pointer: Stays disabled even when toggled "on" in UI Settings (both devices).
Suggested Fixes:
- Sync crosshair cursor speed with system pointer.
- Clamp cursor bounds to prevent edge teleportation.
- Fix crosshair/system pointer coordinate scaling.
In the end, I did this from AI sounds kinda rough, In short it works on Shield TV but I suggest to match system pointer speed with crosshair cursor, on the other hand is not working as It should on the Smart TV, if something aformentioned is not clear just let me know.
Thank you for taking a look. "Edge teleportation" should be handled by the core since it is the defined way of handling offscreen positions, I will check it a bit more on other platforms. System pointer position may not be trivial to get, let's see.
Is the TV remote "OK" button problem new?
The TV remote button OK is the problem just for your latest build, even Intro button is disabled using keyboard, I was able to configure everything by a keyboard thanks to Z & X work as Ok and Cancel.
Just a reminder that even deactivating the mouse by Retroarch's UI the system pointer reveals by pressing right button but is not functional.
Right button handling is special (note to self: https://stackoverflow.com/questions/12705117/handle-all-mouse-events-in-android). Not sure if that will be possible to fully solve, some device quirks may remain. Also system cursor position is not necessarily available for apps. But I will still check if situation can be improved further.