We found that, regarding UE 5, the test build could be started on Steamdeck, but the starting of the shipping build failed on Steamdeck. Could you help us find the reason?
Hello!
I recommend setting up a remote debugging session as described here: How to debug Windows games on Steam Deck (Steamworks Documentation)
Since the recommendation is to attach the debugger, you will need to make a slight modification to the engine code as I’m assuming you will not have the time to attach before the crash happens. Here is a step by step guide:
- In Launch.cpp:
`int32 GuardedMain( const TCHAR* CmdLine )
{
FTrackedActivity::GetEngineActivity().Update(TEXT(“Starting”), FTrackedActivity::ELight::Yellow);
FTaskTagScope Scope(ETaskTag::EGameThread);
//MODIFICATION so the process waits for the debugger to be attached before starting
//#if !(UE_BUILD_SHIPPING)
// If “-waitforattach” or “-WaitForDebugger” was specified, halt startup and wait for a debugger to attach before continuing
if (FParse::Param(CmdLine, TEXT(“waitforattach”)) || FParse::Param(CmdLine, TEXT(“WaitForDebugger”)))
{
while (!FPlatformMisc::IsDebuggerPresent())
{
FPlatformProcess::Sleep(0.1f);
}
UE_DEBUG_BREAK();
}
//MODIFICATION so the process waits for the debugger to be attached before starting
//#endif`
- Compile the Shipping exe locally and overwrite the exe under <Package>\<Project>\Binaries\Win64 on the SteamDeck.
- Set the Devkit Start command to be: ProjectName.exe -waitforattach.
- Start the game on the kit. It will “stall” in an infinite loop until the debugger is attached
- Launch the remote debugging session as instructed in the SteamDeck documentation.
- The debugger should catch the crash and allow you to debug it.
Regards,
Martin
The code for the boot strapper is available with the engine code base and you will find the BootstrapPackagedGame entry under the Programs folder in the VS solution. Engine\Source\Programs\Windows\BootstrapPackagedGame
The tool will be compiled if you package your project using the Editor or the BuildCookRun script.
If you are looking to “embed” the GameInput DLL in your project, you can explore the packaging option named: “Include app-local prerequisites”. This option will copy some DLLs and other required files in the same folder than your project’s exe in the package. The default location is : Engine\Binaries\ThirdParty\AppLocalDependencies\Win64\x64
You could use that option and add the GameInput DLL in the default location so it is automatically added to the package.
How is the GameInput dll loaded by the exe?
- Implicitly: The DLL should be in the same folder than the exe.
- Explicitly: Is the code that loads the DLL pointing at the right folder?
If the DLL is loaded implicitly, you can still force load is explicitly in an early method like the StartupModule of your main game module.
I recommend debugging the process as I instructed initially to understand the reason it fails. Using the Development target might make this easier as the log should contain error messages related to the DLL when it’s not found.
Hi,
Sorry, we found that the issue was not about the Shipping build or the Test build. It was about our game with the GameInput.dll under Windows. Crash will happen as this is not on SteamDeck. We are thinking about changing BootstrapPackagedGame to support a game .exe file that can call other game .exe file based on Steam or SteamDeck.
Do you have any idea about changing BootstrapPackagedGame?
Hello,
We have tried to include GameInput.dll in the folder of the .exe file, but this did not work.