[Bug 50154] New: Allow using SDL_GAMECONTROLLERCONFIG to configure SDL controller mappings
https://bugs.winehq.org/show_bug.cgi?id=50154 Bug ID: 50154 Summary: Allow using SDL_GAMECONTROLLERCONFIG to configure SDL controller mappings Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: hid Assignee: wine-bugs(a)winehq.org Reporter: braiamp(a)gmail.com Distribution: --- As of 5.22, the only way to modify SDL mappings is via a registry key modification (which also has problems on bug #48545). Other applications that support SDL allows using environmental variables to set mappings, which would allow end users to adapt their mappings to the application adhoc rather than having to modify the registry. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50154 --- Comment #1 from Hans Leidekker <hans(a)meelstraat.net> --- Created attachment 68671 --> https://bugs.winehq.org/attachment.cgi?id=68671 patch Here's a patch that implements support for the SDL_GAMECONTROLLERCONFIG environment variable. It takes precedence over the registry key. Note that this supports mapping one controller, whereas the registry key supports multiple controllers. Applies after the patch for bug 48545. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50154 --- Comment #2 from braiamp(a)gmail.com --- (In reply to Hans Leidekker from comment #1)
Created attachment 68671 [details] patch
Here's a patch that implements support for the SDL_GAMECONTROLLERCONFIG environment variable. It takes precedence over the registry key. Note that this supports mapping one controller, whereas the registry key supports multiple controllers.
Applies after the patch for bug 48545.
I've applied both patches over 5.0.3, is there another dependency I'm not aware? Turning +trace doesn't show the string being read. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50154 soredake <gi85qht0z(a)relay.firefox.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gi85qht0z(a)relay.firefox.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50154 --- Comment #3 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to braiamp from comment #2)
(In reply to Hans Leidekker from comment #1)
Created attachment 68671 [details] patch
Here's a patch that implements support for the SDL_GAMECONTROLLERCONFIG environment variable. It takes precedence over the registry key. Note that this supports mapping one controller, whereas the registry key supports multiple controllers.
Applies after the patch for bug 48545.
I've applied both patches over 5.0.3, is there another dependency I'm not aware? Turning +trace doesn't show the string being read.
Can you attach a WINEDEBUG=+plugplay trace? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50154 --- Comment #4 from braiamp(a)gmail.com --- Sorry about that, the message is showing. Some shenanigans about apt package installation. But still doesn't do what I expect: I reversed the A and B and created a string that wine correctly read it:
0026:trace:plugplay:deviceloop_thread Setting environment mapping "030000004c050000cc09000011810000,PS4ControllerMod,platform:Linux,a:b1,b:b0,x:b3,y:b2,back:b8,guide:b10,start:b9,leftstick:b11,rightstick:b12,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,"
But on the control panel, using JS or event controllers it still shows B as 0 and A as 1. I'm not sure if that is expected (joypad.cpl is broken?). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50154 --- Comment #5 from braiamp(a)gmail.com --- Loaded a game, which works fine, so joypad.cpl is broken. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50154 --- Comment #6 from Hans Leidekker <hans(a)meelstraat.net> --- (In reply to braiamp from comment #5)
Loaded a game, which works fine, so joypad.cpl is broken.
It uses dinput which doesn't go through the SDL backend. Rewriting dinput on top of the HID layer should fix that. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50154 Hans Leidekker <hans(a)meelstraat.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |3a007a95e86b6a9795a6ab92a53 | |a08acf58e4b2e Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #7 from Hans Leidekker <hans(a)meelstraat.net> --- Fix committed as 3a007a95e86b6a9795a6ab92a53a08acf58e4b2e. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=50154 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #8 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 6.0-rc1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla