RetroPie forum home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    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

    Mouse works in commandline, but not in Retroarch

    Help and Support
    retroarch 1.8.8 mouse trackball spinner u-hid
    2
    8
    398
    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.
    • AMaraklov
      AMaraklov last edited by

      So I have:
      Raspi 3
      Running retropi Buster 4.7.1
      I'm using a U-HID with an encoder mapped to MouseX, this shows up in Linux under /dev/input/mice and /dev/input/mouse0 with ascii characters. So it's getting input.
      When using it in retroarch with games that support mouse steering for driving games, I get nothing. I tried removing all other input devices other than KB (No Mouse Pad) and the U-Hid. Nothing.
      I tried changing the driver (Joypad) to udev, hid, linuxraw, makes no difference. I added a physical mouse Logitech something... and it worked (udev), steering worked, on the mouse but not on U-Hid. I also checked and have

      mame2003-mame_current_mouse_enable = "enabled"
      mame2010-mame_current_mouse_enable = "enabled"
      mame2003-mouse_device = "mouse"
      mame2010-mouse_device = "mouse"
      

      I tried ilmame2003 and ilmame-2010, no difference, since they both use retroarch as the input, so I didn't expect much, but I figured I'd try.

      I then tried AdvanceMame, which has it's own input mapping separate from Retroarch, and it worked, straight out of the box, U-Hid, had some issues with the buttons, but that was because I didn't know I had to "Hold" them to get mapped.
      I don't know if that is then a bug, or mouse support doesn't extend to U-Hid, or.... it needs two axes to be considered a mouse, but I've spent days with the issue now, and figured I'd want to invite some outside viewpoints.

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

        Can you get a verbose log from running lr-mame2003 and post it on pastebin.com ? This should show which mouse/mice device gets detected.
        You can also switch the mouse index in the Controls menu in RetroArch, under the P1 Port, and see if the encoder's mouse movements get detected.

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

          @mitu

          So I can't get any mouse input to work on 2003 now, I don't know if I need to wipe the config files for 2003, but I tried 2010 and it "Worked" as in the standard mouse was able to steer the car. The U-Hid Optical Encoder does not, yet it works in windows and on a Kubuntu Desktop as a mouse.
          I'll try to get the full log into a paste-bin, but I think this is the relevant input, as I don't see individual mouse events in the log.

          [INFO] [udev]: Keyboard #0 (/dev/input/event1).
          [INFO] [udev]: Keyboard #1 (/dev/input/event4).
          [INFO] [udev]: Keyboard #2 (/dev/input/event6).
          [INFO] [udev]: Mouse #0 (/dev/input/event0).
          [INFO] [udev]: Mouse #1 (/dev/input/mouse0).
          [INFO] [udev]: Mouse #2 (/dev/input/event2).
          [INFO] [udev]: Mouse #3 (/dev/input/event5).
          [INFO] [udev]: Mouse #4 (/dev/input/mouse1).
          [INFO] [udev]: Plugged pad: Universal Human Interface Device Universal Human Interface Device (53769:5377) on port #0.
          [INFO] [udev]: Pad #0 (/dev/input/event3) supports 0 force feedback effects.
          [INFO] [Joypad]: Found joypad driver: "udev".
          [WARN] [udev]: Full-screen pointer won't be available.
          
          
          AMaraklov 1 Reply Last reply Reply Quote 0
          • AMaraklov
            AMaraklov @AMaraklov last edited by

            @mitu

            https://pastebin.com/DyShv3zG

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

              @amaraklov said in Mouse works in commandline, but not in Retroarch:

              [INFO] [udev]: Mouse #0 (/dev/input/event0).
              [INFO] [udev]: Mouse #1 (/dev/input/mouse0).
              [INFO] [udev]: Mouse #2 (/dev/input/event2).
              [INFO] [udev]: Mouse #3 (/dev/input/event5).
              [INFO] [udev]: Mouse #4 (/dev/input/mouse1).

              There are multiple mouse devices detected by RetroArch, so one of them should be the one you need - you just need to change the index of the mouse device in the Port 1 Controls menu (Settings -> Input -> Port 1 Controls) and increment it until you find the correct one.

              994f7999-e430-435c-a7e8-4719d8e3e570-image.png

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

                @mitu So I don't know why it thinks it has 4 Mice, but I made sure I went though setting that value from 0-4 in increments of 1 of course, and no input gives me mouse input... I'll check the U-Hid again in windows, to see if it has changed or no longer recognizes it as a mouse, also I'm not wrong to configure the u-hid for using the X-Axis? I'm sorry I'm grasping at straws....

                -AM

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

                  So I don't know why it thinks it has 4 Mice

                  It's really only 2, but they're read twice. Not sure how the U-Hid does the mapping - maybe it maps X and Y axis movement separately so that's why it creates 2 mice ? Or the 2 devices are from the U-Hid and an actual mouse ?

                  Can you get a verbose log with only the U-Hid connected (i.e. no separate mouse) and post it on pastebin.com ? Please add the entire log file, not only the input detection part.

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

                    @mitu The original pastebin link is still up above your reply, but the newest logs show no mouse activity, even though I was spinning that thing like crazy :
                    This is the whole log...

                    Parameters: 
                    Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/arcade/retroarch.cfg "/home/pi/RetroPie/roms/arcade/polepos1.zip" --verbose --appendconfig /dev/shm/retroarch.cfg
                    [INFO] RetroArch 1.8.8 (Git 9552f87)
                    [INFO] Redirecting save file to "/home/pi/RetroPie/roms/arcade/polepos1.srm".
                    [INFO] Redirecting save state to "/home/pi/RetroPie/roms/arcade/polepos1.state".
                    [INFO] === Build =======================================
                    [INFO] Capabilities:  NEON VFPv3 VFPv4
                    [INFO] Built: Feb 22 2021
                    [INFO] Version: 1.8.8
                    [INFO] Git: 9552f87
                    [INFO] =================================================
                    [INFO] Loading dynamic libretro core from: "/opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so"
                    [INFO] [Overrides] core-specific overrides found at /home/pi/.config/retroarch/config/MAME 2003 (0.78)/MAME 2003 (0.78).cfg.
                    [INFO] [Overrides] no content-dir-specific overrides found at /home/pi/.config/retroarch/config/MAME 2003 (0.78)/arcade.cfg.
                    [INFO] [Overrides] no game-specific overrides found at /home/pi/.config/retroarch/config/MAME 2003 (0.78)/polepos1.cfg.
                    [INFO] Config: appending config "/home/pi/.config/retroarch/config/MAME 2003 (0.78)/MAME 2003 (0.78).cfg"
                    
                    
                    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.