RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Retroarch cores crash on trigger press (Mouse Click) with overlay active

    Scheduled Pinned Locked Moved Help and Support
    lr-fceummwiimotelightgunoverlay
    50 Posts 13 Posters 10.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • roslofR
      roslof
      last edited by roslof

      I updated the Retropie script and attempted to update Retroarch by source, but I don't believe the fix/change made it down yet. I'm not clear on how to view when a fix moves into RetroArch master or otherwise how to build it without the RetroPie Script.

      mituM 1 Reply Last reply Reply Quote 0
      • C
        ChuckyP @MrLightgun
        last edited by

        @MrLightgun what a fitting name to be bringing this update. It has been a while since I had started looking for a solution to this problem... and for once it wasn’t something simple I had overlooked.

        Thanks to everyone for jumping in and keeping this active. Can’t wait for the official release of this fix.

        1 Reply Last reply Reply Quote 1
        • mituM
          mitu Global Moderator @roslof
          last edited by

          @roslof The RetroPie script is not using the RA's latest source, it's pinned to a release (right now it's at 17.6). If you wish to get the latest version, then you'll need to compile it separately and move the resulting binary in the installation folder (/opt/retropie/emulators/retroarch/bin).

          1 Reply Last reply Reply Quote 1
          • S
            SuperJim
            last edited by SuperJim

            I've tried adding the change, and it was successful! I've listed the steps below if you want to compile it yourself. I believe the --enable-neon flag should be added to the configure command, but it won't work for me with that included. * note the configure command is one line, ending with --enable-dispmanx; it seems be wrapping below.

            Update using the script to ensure you have 1.7.6 installed,
            ~/RetroPie-Setup/retropie_setup.sh

            cd
            git clone https://github.com/libretro/RetroArch.git
            cd RetroArch
            git checkout tags/v1.7.6

            <RPI2 only>
            CFLAGS="-O2 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations" ./configure --disable-sdl --enable-sdl2 --disable-oss --disable-al --disable-jack --disable-qt --disable-x11 --disable-pulse --enable-neon --enable-floathard --enable-dispmanx

            <RPI3 only>
            CFLAGS="-O2 -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations" ./configure --disable-sdl --enable-sdl2 --disable-oss --disable-al --disable-jack --disable-qt --disable-x11 --disable-pulse --enable-neon --enable-floathard --enable-dispmanx

            git apply ~/RetroPie-Setup/scriptmodules/emulators/retroarch/01_hotkey_hack.diff
            git apply ~/RetroPie-Setup/scriptmodules/emulators/retroarch/02_disable_search.diff
            git apply ~/RetroPie-Setup/scriptmodules/emulators/retroarch/03_disable_udev_sort.diff

            using whatever editor you prefer, edit input/drivers/udev_input.c, line 991 and replace,

              case RETRO_DEVICE_POINTER:
                   return udev_pointer_state(udev, port, id, false);
              case RARCH_DEVICE_POINTER_SCREEN:
                   return udev_pointer_state(udev, port, id, true);
            

            with the following,

              case RETRO_DEVICE_POINTER:
                if (idx == 0) /* multi-touch unsupported (for now) */
                   return udev_pointer_state(udev, port, id, false);
                break;
              case RARCH_DEVICE_POINTER_SCREEN:
                if (idx == 0) /* multi-touch unsupported (for now) */
                   return udev_pointer_state(udev, port, id, true);
                break;
            

            make
            sudo cp retroarch /opt/retropie/emulators/retroarch/bin

            roslofR 1 Reply Last reply Reply Quote 0
            • WarC0zesW
              WarC0zes
              last edited by

              @SuperJim I'm a beginner for compile. It's possible to share your compiled retroarch with the fix?

              RetroPie v4.5.1 • RPi3 Model B • NorthPada 5V 3A • 128GB SanDisk Ultra Cat.10 microSDXC • 1 x Logitech Wireless Desktop MK250 • 1 x Qanba Q4RAF USB Arcade joysticks • 1 x PS4 Dualshock4 v2 controller • 1 x Mayflash Dolphinbar + Nintendo WiiMote.

              1 Reply Last reply Reply Quote 0
              • S
                SuperJim
                last edited by

                I don't think I can upload files here.

                1 Reply Last reply Reply Quote 0
                • roslofR
                  roslof @SuperJim
                  last edited by

                  @SuperJim your steps worked like a charm. Feels amazing to finally be able to play trackball games w/overlays. Thanks Jim & all for helping make this fix a reality after so long...

                  1 Reply Last reply Reply Quote 0
                  • maxbeanzM
                    maxbeanz
                    last edited by

                    Does anyone know if this has been fixed yet or do we still have to manually do @SuperJim 's fix above ? I'm about to redo my Pi setup.

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @maxbeanz
                      last edited by

                      @maxbeanz It has only been fixed upstream, but the fix is not yet part of the RetroArch package in RetroPie.

                      1 Reply Last reply Reply Quote 0
                      • maxbeanzM
                        maxbeanz
                        last edited by

                        @mitu So it's safe to just update RetroArch from source ?

                        mituM 1 Reply Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator @maxbeanz
                          last edited by

                          @maxbeanz No and no. The source update would still get you the 1.7.6 version (before the fix was added) and removing the version tag from the source script would not be able compile the latest dev/master (due to https://github.com/libretro/RetroArch/issues/8448).
                          I suggest to either apply the patch to the 1.7.6 build or wait for the next RetroArch package release.

                          1 Reply Last reply Reply Quote 0
                          • maxbeanzM
                            maxbeanz
                            last edited by maxbeanz

                            OK thanks, i'll bookmark this page.

                            One last thing, he says 'enable neon' should be added but it doesn't work for him. Is this going to make much difference for Raspberry Pi 3 ?

                            mituM 1 Reply Last reply Reply Quote 0
                            • mituM
                              mitu Global Moderator @maxbeanz
                              last edited by

                              @maxbeanz said in Retroarch cores crash on trigger press (Mouse Click) with overlay active:

                              One last thing, he says 'enable neon' should be added but it doesn't work for him.

                              Because the configuration script needs some CFLAGS set to enable NEON for the compiler. These are added automatically by the RetroPie setup script so --enable-neon would work and NEON would be enabled by the configuration script. See here.

                              Is this going to make much difference for Raspberry Pi 3 ?

                              IMHO yes.

                              1 Reply Last reply Reply Quote 0
                              • S
                                SuperJim
                                last edited by SuperJim

                                It's the configure command that fails, with the following message,

                                Checking presence of predefined macro __ARM_NEON__ ... no
                                Build assumed that __ARM_NEON__ is defined, but it's not. Exiting ...

                                I googled around for it, and it sounds like the specific name for this macro may have changed? In any case, the command worked with 1.7.5, but not with 1.7.6; I'm guessing there's a simple change that would fix it. I also don't think the mali option is actually needed on the pi.

                                mituM 1 Reply Last reply Reply Quote 0
                                • mituM
                                  mitu Global Moderator @SuperJim
                                  last edited by mitu

                                  @SuperJim You'll need to run configure with

                                  CFLAGS="..." ./configure <arguments>
                                  

                                  and the value of CFLAGS is the one from the link I posted earlier. The RetroPie scriptmodule automatically adds those, since the default compiler options on a Raspbian are more conservative (supporting all PI models).

                                  S 1 Reply Last reply Reply Quote 0
                                  • S
                                    SuperJim @mitu
                                    last edited by

                                    @mitu thanks for that! I've updated the instructions above.

                                    1 Reply Last reply Reply Quote 0
                                    • D
                                      dudumaroja
                                      last edited by dudumaroja

                                      hello, @SuperJim `s fix works great fix the freezing when using overlay but break the mame2003 use,, you cant use the full screen somehow the cursor only cover a 1/4 of the screen ( when using dolphin bar ) nes and snes are working great for me.

                                      1 Reply Last reply Reply Quote 0
                                      • H
                                        holto
                                        last edited by

                                        I also had the issue and am worked through the instructions to compile and copy the patched RA version. Since I couldn't think of a way to cut and past, the long command beginning with cflags was a bit tricky. After several failed attempts I realized the -O2 was a letter "O" and not a zero. Thanks for the instructions none the less. The fix worked with tests in scummvm and arcade(lr-mame-2003 emulated centipede) using a mouse. I have not tried the fix yet on my home arcade which has a trackball instead of a mouse. I expect it will work fine. I thankfully did not experience the problem mentioned above with lr-mame-2003. Thank you all for the work on this issue.

                                        1 Reply Last reply Reply Quote 0
                                        • P
                                          punchout
                                          last edited by

                                          Hey guys!
                                          I've tried the steps above without any luck.. my apologies.. but I must be missing something. I am using PuTTY!! Any help would be great! Really would like to get rid of the crashing on left click. pi3.PNG

                                          P 1 Reply Last reply Reply Quote 0
                                          • P
                                            punchout @punchout
                                            last edited by

                                            @punchout Sorry where do I find this file.. "using whatever editor you prefer, edit input/drivers/udev_input.c, line 991 and replace," I am using FileZilla

                                            S 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.