

It is a translation layer, but the bit you added “to native code” sounds like you’re misunderstanding what translation layer means.
Games use a collection of APIs (DirectX is a set of APIs, but there’s others to handle offer operations like network access and such) to interact with OS functionality, and also receive communicarion back from the OS (the windows message loop). Proton and wine are implementations of those APIs that translate the API calls to their equivalent in linux, as well as setting up their own message loop that translates messages from the linux kernel and UI system into their windows equivalent before sending them to the registered windows messaging loop functions.
A simple example would be if a function header in windows looks like int32 SomeFuncWin( int64 index, char* name ), but looks like int32 SomeFuncLinux( std::string name, int64 index ), then the translation would be something like:
int32 SomeFuncWin( int64 index, char* name ) {
std:string TranslatedName( name );
return SomeFuncLinux( TranslatedName, index );
}
So it doesn’t change/translate any of the code of the program itself, it just provides the environment that behaves exactly like a windows environment by translating the “hey could the OS do this for me?” requests from windows to linux. Note that not all translations are that simple, there might need to be more processing on the values, missing arguments might need to be filled in, irrelevant arguments ignored, sometimes data needs to be translated to another format, etc.
The speed ups can come from improved efficiency in the underlying implementations (which Vulkan has, as I understand even using a translation layer from DX to Vulkan in windows can result in better performance) or having fewer services running in the background.




Yeah, I can say that covers most of the “troubleshooting” I’ve had to do with games that don’t work. I usually go in thinking “uh oh, maybe it’s time for me to have to check a bunch of proton versions, this will be a pain” only to see that it’s trying to run it natively and switching to proton at all resolves any issues.
The only other thing that comes to mind is that I use dvorak and something about the way keyboard layouts are handled means it tries to “preserve” the bindings when I switch layouts in game, so it keeps the messed up QWERTY keys but dvorak layout even when I switch (and can tell it’s switched from typing things like in chat). Most games let me rebind the keys so I just need to go through the bindings, hitting the key currently bound each time as if I was using QWERTY and it rebinds. Though I suspect that due to the “preserve the layout” behaviour that keyboard input is handled specially by proton and maybe I can tweak settings to get the desired behaviour (ie, changing layouts in game means I want the bindings to change).