kodi-game / game.libretro.scummvm

ScummVM GameClient for XBMC
https://github.com/libretro/scummvm
1 stars 5 forks source link

Analog sticks do not move cursor. #26

Open 50J0uRNeR opened 2 years ago

50J0uRNeR commented 2 years ago

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

While testing a source build of Scummvm in Kodi 19 on a PI 4b, I noticed that the controller analog sticks will not move cursor, no matter how the controller is mapped.

RetroArch Behavior

Here is a clear and concise description of what happens in RetroArch with the same core/game:

I've only tested in Kodi 19. I can only assume the analog sticks work in RetroArch.

To Reproduce

Steps to reproduce the behavior:

  1. Run Myst in Kodi 19 (with a properly mapped controller).
  2. Try to use mapped analog sticks to move cursor.

Debuglog

The debuglog can be found here: No log necessary.

Screenshots

Here are some links or screenshots to help explain the problem:

No screenshots necessary.

My Environment

Used Operating system:

Operating system version/name: Raspbian GNU/Linux 11 (bullseye) 32bit

Kodi version: Kodi 19 Matrix, debian package 2:19.3-1-bullseye

Emulator: Compiled from https://github.com/libretro/mupen64plus-libretro-nx/archive/b76ea63eeeba4c3b0364504a7cea01f1b826c3ae.tar.gz

My Solution

I decided to go ahead and resolve this issue myself as it is related to several other issues in Scummvm that needed to be patched. Here is a link to a post containing several patches to Scummvm, one of which fixes analog support https://github.com/libretro/scummvm/issues/194. One small change is required in the addon's buttonmap.xml in order to get the analog sticks working with the patched emulator. Heres a patch...

--- orig/game.libretro.scummvm/resources/buttonmap.xml  2022-02-17 20:34:53.165121935 -0500
+++ repo/game.libretro.scummvm/resources/buttonmap.xml  2022-02-18 00:46:25.179738878 -0500
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <buttonmap version="2">
-  <controller id="game.controller.default" type="RETRO_DEVICE_JOYPAD">
+  <controller id="game.controller.default" type="RETRO_DEVICE_ANALOG">
     <!-- Left Mouse Button -->
     <feature name="b" mapto="RETRO_DEVICE_ID_JOYPAD_A"/>
     <!-- Right Mouse Button -->

I'm not sure if the Scummvm patches will ever be submitted to trunk however I think this addon change will still be necessary to get analog sticks working in the future.

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.