Temporary: Controller Configurations for Citra

If you have problems with using any of these configs, please reply and tell us what Method, OS, Controller, config and version of Citra you used. Please make absolutely clear if it DID or did NOT work.
Also if you have your own configuration files for other controllers, that’d be awesome.

How to Configure your controller

  1. If you have never ran Citra: Run Citra for the first time so it generates a configuration file
  2. If you have Citra running: Quit it now. Citra has to be closed for the next few steps
  3. Find out where your User-Directory is is
  4. Go to that the User-Directory folder (with a File Manager / Explorer) and open “qt-config.ini” with a text editor (just notepad or something)
  5. Edit your [Controls] section as described by any of the methods below, leave the rest of the file as is (Don’t forget to save!)

You should be done now and your controller should work!


Configurations

Recommended: Most controllers (Windows, Linux, Mac)

supplied by @JayFoxRox

How-To:

  1. >>> Click here to go to my website <<<
  2. Select the correct Platform / OS on that website
  3. Optionally: Type a part of your controller name in the search field
  4. Search your controller in the list. Note:
  • PS4 controllers are also known as “DualShock 4” controllers.
  • Xbox controllers are also known as “XInput” controllers.
  1. Now copy that control config block (only the one for your controller!) to your config
  2. Save your config and start Citra - your controller should work now!

Troubleshooting:

  • If the first config you tried did not work:
    • Verify that you copied the config correctly to your config file
    • Try another config from the list with a similar name (some gamepads were released in different versions)
    • Try a config for your gamepad for another platform (maybe there is an error in the database)
    • If you have multiple gamepads or similar input devices connected to your PC: increment the joystick index and copy the updated config
    • Remove lines which contain Broken! from your config file

Some configurations will contain Broken!. This usually happens because those controller don’t have enough buttons or they don’t closely resemble the 3DS buttons. In the future the script might be changed to automatically fall back to keyboard input for the missing buttons. However, currently I don’t know what will happen if you use such a config.

xinput (Xbox 360 / Xbox One gamepads and many others)

supplied by @wwylele

[Controls]
button_a="engine:sdl,joystick:0,button:1"
button_b="engine:sdl,joystick:0,button:0"
button_x="engine:sdl,joystick:0,button:3"
button_y="engine:sdl,joystick:0,button:2"
button_up="engine:sdl,joystick:0,hat:0,direction:up"
button_down="engine:sdl,joystick:0,hat:0,direction:down"
button_left="engine:sdl,joystick:0,hat:0,direction:left"
button_right="engine:sdl,joystick:0,hat:0,direction:right"
button_l="engine:sdl,joystick:0,button:4"
button_r="engine:sdl,joystick:0,button:5"
button_start="engine:sdl,joystick:0,button:7"
button_select="engine:sdl,joystick:0,button:6"
button_zl="engine:keyboard,code:49"
button_zr="engine:keyboard,code:50"
button_home="engine:keyboard,code:66"
circle_pad="axis_x:0,engine:sdl,joystick:0,axis_y:1"
c_stick="axis_x:3,engine:sdl,joystick:0,axis_y:4"

PS4 Controllers (Windows only)

supplied by @GabrielXZLIVE

For PS4 controllers, there may be an easier solution than making a profile from scratch. There is a tool called DS4Windows. With that installed, you can apply a 360 [editors note: see “xinput” configuration by wwylele above] preset on your controller and also use the touchpad as a mouse. Use that and that 360 profile will work for you (and you’ll have the touch features as well).


I mean, that’s the idea, but I haven’t tested it yet. I’ll test it later and, if working good, update the guide.


This is largely based on existing posts by @wwylele and a tutorial by @GabrielXZLIVE - all credits to them

(I was originally going to create a wiki article about this, but then figured it would only be a temporary thing anyway)

9 Likes

What about macOS version ? :slight_smile:

Scroll down on the website, @azoreseuropa . There’s even Linux.

Great work BTW @JayFoxRox! Hope it won’t be necessary for long tho :thinking:

it won’t be long. the code is almost ready for review

What? Even Linux version works for macOS version also ?

Check the website linked from “Most controllers”. There are a lot of controller configs for Mac / Linux / Windows.
//Edit: Updated with a platform select dropdown.
You can also configure the joystick index now if you have more than one joystick connected. Try with 0 first, then try one 1, 2, 3… until you “find” your joystick.

1 Like

Bump: I’ve just updated my website and rewrote the description above to be easier to follow.

Warning / Information: The latest bleeding edge has added C-Stick support. However, the old Xbox 360 config which was provided here was actually broken and might cause issues (it has since been corrected)! The config available through my website were always correct though.

I still recommend to verify this.


I’d also like to remind that this method of using a controller is better than xpadder or other Gamepad-To-Keyboard solutions. You will have finer control over your game / characters with the analog stick. It is not technically possible to have as much control with xpadder and similar tools.
So even if you have a working setup using some tool, I still strongly recommend to upgrade.
By upgrading to these configurations, you are also helping us test the Citra controller input code which will eventually become even more powerful.

2 Likes

This works much better than using anything like xpadder because you get nuance in the controls, thanks
are you sure that the config for zl and zr are correct, since it seems to link to keyboard?
it should probably be left and right bumper or rb and lb

Thanks for asking - I forgot about that: These have currently not been supported (by Citra), just like C-Stick. I’m not sure if they work now that C-Stick has been implemented. I’ll find out soon and update my script accordingly (expect a topic bump).

1 Like

So maybe I’m just a moron but I’m in my user directory (I’m on macOS Sierra 10.12.3) and I can’t seem to find the qt-config.ini file. I don’t even have a config direction like they say I’m supposed to within the user directory.

I have this config file but I don’t really know if its the right one or whatever.

thanks alot for your work !! now my analog stick now work as intented with a 0-100% range value !

i had to manually rearange 2 button since A and B and X and Y was inverted.

also my weapon 1 and 2 are not bind in ocarina of time. ill look at this when a got some spare time !

but again, thanks alot for all of this!

@Nick It’s suppose to be ~/.local/share/citra-emu/config/qt-config.ini. You are currently editing ~/.local/share/citra-emu/nand/data/00000000000000000000000000000000/sysdata/00010017/00000000/config. Note that the .local folder is usually hidden so you’ll have to change your settings to see it.

1 Like
  • A / B and X / Y are inverted because the Xbox A button is where a 3DS has it’s B button and so on. The physical location of the buttons is still correct (ignore the labels).

  • The I and II buttons in Zelda: OoT are not mapped to actual hardware buttons even on 3DS - they are only controllable through the touchscreen.

Oh I found it haha, it was in ~/.config/citra-emu/config/qt-config.ini the /.config was straight up in the users direction and not in .local for whatever reason. Thanks though! @Leo121

Every thing is working perfectly now!

Where is that config for Mac version ?

This was literally answered one week ago:

If you meant the config file on your local disk this is described on the wiki page linked in the second paragraph of the first post…
If the wiki article is not accurate modify it please - we depend on the community to help us with these kind of things.

1 Like

I have a Recoil GGE909 Gamepad with retractable usb cord. I was curious if anyone could tell me which one of these I would need to use it? Thanks in advance!

EDIT:
Nevermind! I tried “xinput (Xbox 360 / Xbox One gamepads and many others)” option. Works

Sorry for taking so long for this: I’ve added code to properly map ZL and ZR now if they are axis on your gamepad (Mapped to left/right trigger, activating at -80% pull [-100%;+100%] = 10% pull [0%;+100%]).
I’m not sure what will happen if your gamepad already provides the second shoulder buttons / triggers as a button.
I’ve also not tested this feature myself because I don’t currently have any games which use these buttons and there is no homebrew which supports this feature either.

Feedback welcome!

//Edit: I’ve updated my script to use a -80% threshold now as xbox triggers seem to end up in a -100% to +100% range and not 0% to 100% as expected. If you have trouble with this, change the threshold:-0.8 to threshold:0.1 and inform me about this (naming your controller + OS, so that I can fix this).

Hi,

I went on the website to copy/paste:
button_zl="engine:sdl,joystick:0,button:5,threshold:-0.8,direction:+"
button_zr=“engine:sdl,joystick:0,button:7,threshold:-0.8,direction:+”

Which is supposed to enable us to use the left and right triggers. However, I found that buttons 5 and 7 use the right bumper and the start button of the xbox controller, which means that the left and right triggers remain unused.
So, even though the xinput mapping is mostlycorrect (not the one on your website though, the one at the beginning of this post), the buttons R and L of the 3DS are assigned to the left and right bumpers of the xbox controller and the ZL and ZR buttons of the 3DS remain unassigned (since the xinput mapping of your website use the wrong buttons).

In short, I still can’t use the left and right triggers. I may have done something wrong and I’m completely off though ahah

Tried to correct it by myself thanks to: http://wiki.unity3d.com/index.php?title=Xbox360Controller but can’t seem to do it.

@Emualliug What OS and controller did you choose?

Windows, “XInput” gives me “ID 171: XInput Controller (Windows)” which is:

button_zl="engine:sdl,joystick:0,axis:2,threshold:-0.8,direction:+"
button_zr="engine:sdl,joystick:0,axis:5,threshold:-0.8,direction:+"

Similarily this also happens for Linux and OSX. So please be more specific what controller / controller config / OS etc. you are using.