Moonlight + Xbox One Controller (2015)
-
I just got a RP3, installed RetroPie and moonlight. Installs all went great, Moonlight launches great, can launch a steam game no problem...but my xbox one controller mapping is all over the place. Right trigger is start, right analog up/down is right/left, etc.
I tried putting gamecontrollerdb.txt file in the directory and running with "-mapping [folderstructure]\gamecontrollerdb.txt" but this returns
"No mapping available for Microsoft X-Box One pad (Firmware 2015) (030000005e040000dd02000003020000) on /dev/input/event1"I am completely lost. Any help getting my controller working properly?
Edit: Followed this guide for installing Moonlight, skipping step 6 as the mapping should not be needed (nor does it work).
Edit 2: Looking in the gamecontrollerdb.txt file I do see a line for the controller ID/hash returned above:
030000005e040000dd02000003020000,Microsoft X-Box One pad v2,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,platform:Linux,
Edit 3: Steam (via moonlight) sees the Xbox One controller as a "Generic xinput" device. Tried to create separate mapping, but thumbstick clicks are not recognized.
-
I know this post is a couple months old, but I've just set up moonlight today on my Retro-Pie setup, using the same controller, and ran into a similar (if not the same) issue... But I managed to come up with a solution which (I think) will hopefully help others.
Long story short, I replaced the line matching the controller's ID (030000005e040000dd02000003020000) in /usr/share/moonlight/gamecontrollerdb.txt with this:
030000005e040000dd02000003020000,Microsoft X-Box One pad (Firmware 2015),platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b8,guide:b10,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,
When I start moonlight it outputs an error about the config not being correct now, but it actually works (button mappings matched what Steam/games wanted, with no manual config necessary within steam or games).
I came up with this mapping by running the SDL "controllermap" utility. I compiled it using the steps laid out here
Now it's very possible I did something wrong, but when I ran controllermap, all I got was a blank screen (apparently you're supposed to see prompts asking you to assign/map buttons, but I never saw this). The first time I ran it I just mashed buttons until it exited. What this accomplished was it allowed me to get an idea of what order it took the inputs (based on the order it output them in the configuration string that was output when controllermap exited. Then, using this order as a reference, I ran controllermap again I pressed the buttons/joysticks in the order seen in the configuration string. This time controllermap output the string I included above. Then, as I said, I replaced the existing mapping in moonlight's config file. Then I rebooted (probably unnecessary) and launched moonlight again, and my controller was working.
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.