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
Multiple emulators crash on mouse click if using an overlay. #8326
Comments
I tried with pcsx-rearmed and while it did not crash here, RetroArch and the core both freeze upon clicking the left mouse button when an overlay is enabled. |
This broke between I bisected this to where the freezes started.
This also broke in an earlier commit where all mouse clicks on the psx gamepad overlay are registered as
I next confirmed that his is only a problem with the @MrLightgun What input driver are you using? |
@casdevel Can you please take a look at this issue? Any help would be appreciated! I was able to reproduce this with both snes9x-libretro and pcsx-rearmed. |
Hi @orbea , thank you for your time, I'm using udev input driver. |
I tried all three patches which all solve the freeze, but the 2nd and 3rd have an issue where mouse clicks are registered just by moving the mouse and not when clicking. This is undesirable with a gamepad overlay. The first patch doesn't have this problem, but the buttons seem misaligned with the overlay and clicking the correct button is hard or impossible. This seems to be a step in the right direction. :) Thanks for taking the time to help! |
Someone who is familiar with overlay code should check this loop: RetroArch/input/input_overlay.c Line 766 in 0aa9df6
It looks like incorrect usage of the "input_driver::input_state" function on line RetroArch/input/input_overlay.c Line 767 in 0aa9df6
|
@orbea try again https://github.com/casdevel/RetroArch/tree/i8326. Note that link is the same but code is different. |
@casdevel I tried it again, it seems slightly better when I can sometimes click the correct button, but its still misaligned with others. Take the psx gamepad overly for example with snes9x. |
Hi Both @orbea and @casdevel , thank you very much for your efforts, I haven't previously compiled Retroarch from code so I need to get the hang of that before I can test your fixes. @orbea what platform are you testing the fixes on? Do you think I need a full Linux PC or will I be able to do it on the Raspberry Pi? |
@MrLightgun I'm testing with destop linux, I don't think this issue is specific to arm, just the udev input driver. |
Pointer misalignment is udev driver issue and is not overlay specific. Crash/freeze is not udev driver issue but can be fixed in driver code. I still think that this should be fixed in overlay code. |
@casdevel do you see any possible negatives with your fix other than it's a defensive work around? @orbea were you completely unable to click on the overlay buttons before and now you can? Can we promote this defensive fix and I'll raise a different issue about the misalignment if I can replicate? Thank you both |
Agreed, I wish I could help more though... |
OK, my mistake, I completely forgot about multi-touch. This is an udev driver issue after all. My last commit is still OK, I'm just gonna add comment about multi-touch and make a pull request. @MrLightgun you may open a new issue about pointer misalignment. In the meantime you may try some other input driver. |
Fantastic thank you both, much appreciated. |
I take it this is resolved, so I'm going to close the issue. If not and I'm misunderstanding, feel free to reopen. |
Description
If you load an overlay using standard functionality in RetroArch and have a mouse attached. When you perform a mouse click the emulator core completely freezes and requires a reset. This happens across multiple cores.
I suspect this is in a bug to do with touchscreen controls that use an overlay, otherwise the 2 bits of functionality are very unrelated. Please note this bug occurs just using a normal overlay image/bezel, it doesn't require any touchscreen controls to be added.
Expected behavior
The emulator should not crash and the mouse should function as it would if there was no overlay loaded.
Actual behavior
On any mouse click the emulator is completely freezing / crashing requiring a reset.
Steps to reproduce the bug
This happens on a Raspberry Pi using RetroPie however I believe it is a Libretro bug.
Bisect Results
[Try to bisect and tell us when this started happening]
This thread on the issues says it is happening at least as far back as 1.7.2. I would suspect it is a very long standing issue.
https://retropie.org.uk/forum/topic/16926/retroarch-cores-crash-on-trigger-press-mouse-click-with-overlay-active
Version/Commit
You can find this information under Information/System Information
1.7.2 up until the latest release.
Environment information
Thank you to anyone that takes the time to look at this bug. Kind regards.
The text was updated successfully, but these errors were encountered: