Yesterday I made this post about non-steam games only using default controls even when you changed them. Turns out it's a bug that has to do with the way the game id's are generated and used for non-steam games. Basically, every non-steam shortcut gets a 32-bit random App ID that's used to save the custom profile under. The bug causes an issue where anytime the game window takes focus, the system truncates it to the lower 24-bits. This 24-bit ID doesn't have a matching controller profile, so it rollback to the default. The steam menu still shows the profile under the full 32-bit ID, so it looks like you're changing things when you're not. Well here's how to fix it!
Note: I recommend pulling this guide up on the frame itself for copying and pasting. Manual typing on the VR keyboard is not fun! Also I made this guide while pretty tired so it might be formatted weird. It's been a long day lol. Might fix it later, might not who knows.
Adding the Game to Steam
If you already know how to do this, skip to the next part! But we first need to add the game to steam. The process is slightly different depending on whether it's a windows executable or a Linux one. For Linux, look for a .sh file. For windows, look for the .exe. If a game comes with both, use the .sh file.
- Open desktop mode and navigate to the game in Dolphin
Right click (By default a stick click is bound to this) and select "Add to steam"
- This creates what's called a shortcut that links to that game visible in the library
- Before you click play there's a few settings we want to take a look at
Now we need to do some things to this before launching it for the first time
- Navigate to the "Non-steam" section of your library and click on the game you just added
- Click on the settings icon on the right, and click properties
- The first thing you should do is rename the shortcut. Usually I just remove the
.exe or .sh from the game name but you can rename it to whatever you want On the left side go to the compatibility section
- For Linux games select "Steam Linux Runtime 1.0"
- For Windows games, I believe Proton Experimental works best, though you might have to try a few options before you get it to work. If you know any better let me know in the comments!
- All the other settings are fine to look at, but don't change anything if you don't know what it does
Now the game should launch and you're ready to go! If you don't care about setting up custom inputs you're done! I will note that if you plan to play games that you don't want other people seeing, non-steam games cannot be marked private. If you don't want people seeing it you'll have to mark yourself offline.
Fixing the Steam Input Issue
Now we can fix this weird bug! Hopefully this part of the guide becomes outdated, because this is a fairly tedious process, though it's not hard! We just need to make the non existing 24-bit Id exist! Before you get into this, install KWrite through discover, unless you really want to use vim as your text editor (masochist).
- Launch the game, press the grip button, and press the controller settings button to the left of the flat screen game
- Click "Controller Settings" at the bottom of the screen, then "Edit Layout"
- Change at least one button here so it gets logged for us to see later
- Close the game
- Open Desktop mode again
Open Dolphin and find the log
Go to Home, and if you can't see the hidden files that start with "." open the virtual keyboard and press "ctrl + H"
- If you don't have a custom keyboard that has a control key. instead navigate to the hamburger menu in the top right, go to more, view, and check "Show Hidden Files"
Navigate through .local/share/
- Right click on the Steam folder and click "Add to places" because we'll be coming back here and you'll want this shortcut if you have to do multiple games. You can also add one for the logs folder next
- Continue through share/Steam/logs
- Open the file labeled
controller_ui.txt
It'll look scary, but we only need a small bit of information. Scroll all the way down and look for a line that shows when the game window took focus
- You're looking for a line that says
OnFocusWindowChanged to game window type: AppID <ID> - In my case it's 10275341 and looks like
OnFocusWindowChanged to game window type: AppID 10275341 10275341 - Copy that number and save it somewhere. Also note that this is different than the window changed that says
k_nGameIDControllerConfigs you can ignore that number
Now we need to navigate to the controller config area
- In dolphin navigate to
.local/share/Steam/steamapps/common/Steam Controller Configs/ - Open the numbered folder there. That's your Steam account ID that is unique to you.
- Open the config folder
- There should be a folder with the name of your shortcut on it, though it will be put in lowercase and _ put instead of spaces.
- Open it and make sure
controller_steamframe_pair.vdfis inside
Now we make a symbolic link with the information we have gathered. This basically makes a new folder under the truncated ID that replicates all the information in the correct folder. So now any changes you make to the controller settings in game get applied to the truncated ID that actually gets used
- Open Konsole and run this command to create the link, subbing in anything with <> for the actual information you found
ln -s "$HOME/.local/share/Steam/steamapps/common/Steam Controller Configs/<YOUR_USER_ID>/config/<SHORTCUT_FOLDER>" "$HOME/.local/share/Steam/steamapps/common/Steam Controller Configs/<YOUR_USER_ID>/config/<TRUNCATED_ID>"- In my case it would look like this (Except for my user ID of course I'm not doxing myself lol)
ln -s "$HOME/.local/share/Steam/steamapps/common/Steam Controller Configs/<YOUR_USER_ID>/config/example_game" "$HOME/.local/share/Steam/steamapps/common/Steam Controller Configs/<YOUR_USER_ID>/config/10275341" - There should now be a folder in config with the truncated id, and it should have a little link symbol on it. Opening it should reveal that same file you saw earlier
- Now all we have to do is register this new id and we're done!
- Before you do this, you might need to disable steam cloud. For some reason it likes to sometimes overwrite this edit. idk why and it's inconsistent, but if you have problems try that. You can re enable it after you're done, but make sure to make at least one more edit to the controls before turning it back on so it updates the time stamp
- in the config folder open
configset_controller_steamframe_pair.vdf - Inside it basically has all the games with a simple argument. Mine shows "autosave" "1" for all of them but if yours is different, just match whatever it shows.
- Add the truncated ID as a folder to this list, making sure you match the curly braces correctly. Also make sure all the spacing is the same. Here's what mine looks like (Reddit messes up the spacing a bit so just make sure to match exactly what your file looks like)
"controller_config"
{
"example_game"
{
"autosave" "1"
}
"10275341"
{
"autosave" "1"
}
}
11. Now go to your desktop and double click Return to Gaming Mode so everything updates properly
And that's basically it! Now just launch the game and hope it worked. If it doesn't work then double check if you did everything correct. If it still doesn't then... man good luck lol. Took me over 5 hours to figure this stuff out to solve my problem. I can try to help as much as I can in the comments, but no promises!
If you have any input or suggestions please feel free to add them below! I happily take constructive criticism and will edit my guide if changes are needed. But that's it! Thanks for reading!