-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for adding new SDL2 controller mappings? #4053
Comments
We already have support of controller mapping file. You can open Ryujinx directory (the same one as the configuration) and puts a https://github.com/Ryujinx/Ryujinx/blob/master/Ryujinx.SDL2.Common/SDL2Driver.cs#L94 |
OHMAN, really?! MIRACLES OF MIRACLES! *tries it out* Okay, slight hiccup I'm having-- I can't have more than one controller on my Mayflash DolphinBar (which is in Mode 3, controller mode). In Dolphin and other emulators, it's possible to use all four at once, since none of them share the same button spaces in the GUID. Any chance I'm doing something wrong here? Only the last mapping I put in works, as if it's overwriting itself.
But yes-- this is incredible, Mary!! I haven't seen a single person talk about this-- obviously, I'm sure anyone who is developing the emulator or has any know-how about coding (which I really don't) would think this is "no-duh" common knowledge, but shouldn't this be added to some really accessible documentation about controllers so people can know what to do? ^_^ All the best. |
Not really sure tbh I haven't used that feature much ^^'
The reason it exists is because I wanted people to be able to use SDL_GameControllerDB if needed but never documented it yeah. We should update the guide to have that baked in. It should also be noted that it's not currently possible to reload that as it's done at initialization of the emulator. |
Hooray! Thank you so-so much for your hard work, all the best. I asked the question over at the DB GitHub, and they said it was a problem that SDL2 had to work out, but-- I mean, as I said, it seems to be possible to access all the info from all four at once, at least in Dolphin. Here's my GitHub issue, in-case it ends up being useful at all. Rock rock on! |
@marysaka i tried to put the file in the main directory called in the same way, nothing happen |
Wow, I placed the file and restarted, it worked. Thank you so much. |
Just as a heads-up, looks like SDL_GameControllerDB.txt has stopped being read by Ryujinx on any version after 1.1.1118. Dunno if I've done something wrong with my formatting of the mapping, but yeah-- after 1.1.1118, my controller stops showing up under Input. I'm on macOS, if that makes a difference. |
@HomeStarRunnerTron There was a code change in the SDL2Driver class. Instead of placing it in the Ryujinx folder it should be placed in /Applications/Ryujinx.app/Contents/MacOS. ![]() ![]() |
Oh, thank GOODNESS-- so happy that this massively important (for me) feature is moving forward! : ) |
I think that should be fixed, this should be placed somewhere else imo as otherwise you invalidate the app signature on macos.. |
Now that #6295 is merged, you (and others in this thread on macOS using this feature) will need to place the SDL_GameControllerDB.txt file inside |
In the current 1.1.1179 build, it seems like it only successfully reads the SDL_GameControllerDB.txt some of the Time-- like, 50% of the Time that I open Ryujinx, the controller I've added doesn't show up. Just seems random. Heading back to yesterday's builds for now! EDIT: Shucks, I'm realizing with stress-testing that all versions since the change at 1.1.1119 are causing my controller to only sometimes show up on boot. With stress-testing 1.1.1118, it shows the controller every time. SO back to 1.1.1118 for me in the meantime. |
I still have this problem on Linux. Gamepad does not appear. EDIT: I found a solution. I downloaded the gamecontrollerdb.txt from https://github.com/mdqinc/SDL_GameControllerDB and I renamed it in SDL_GameControllerDB.txt and I put this in /home/XXX/.config/Ryujinx/ Is it possible to add this file automaticalli in the build? |
Feature Request
Allow for adding new SDL2 controller mappings?
What feature are you suggesting?
Overview:
Smaller Details:
But they are recognized by the SDL2 Gamepad Tool, which made me wonder if I could do anything about this!
I decided to open up Ryujinx's libSDL2.dylib in Hex Fiend and noticed that some of the code was storing controller mapping strings, just like what the Gamepad Tool generates!
I tried just copying-and-pasting a new mapping, but of course, since this .dylib is compiled, there's no adding-- only replacing with the exact same amount of characters. So I found a controller mapping, and then modified the name of my controller until the line, in total, was the exact same amount of characters.
And then my controller, which hadn't even shown up before, worked perfectly!
Nature of Request:
Why would this feature be useful?
... So, if instead of needing to replace in hex, one could just add a new line of code to a plain-text file; I think it could make a world of difference!
The text was updated successfully, but these errors were encountered: