diff --git a/Source/Windows/ARM64EC/Module.cpp b/Source/Windows/ARM64EC/Module.cpp index ab3e7a35e..2be579233 100644 --- a/Source/Windows/ARM64EC/Module.cpp +++ b/Source/Windows/ARM64EC/Module.cpp @@ -581,10 +581,13 @@ NTSTATUS ProcessInit() { InitSyscalls(); FEX::Windows::InitCRTProcess(); - const auto ExecutableName = FEX::Windows::BaseName(FEX::Windows::GetExecutableFilePath()); + const auto ExecutablePath = FEX::Windows::GetExecutableFilePath(); + const auto ExecutableName = FEX::Windows::BaseName(ExecutablePath); FEX::Config::LoadConfig(fextl::string {ExecutableName}, _environ, FEX::ReadPortabilityInformation()); FEXCore::Config::ReloadMetaLayer(); FEX::Windows::Logging::Init(); + FEXCore::Config::Set(FEXCore::Config::CONFIG_APP_FILENAME, ExecutablePath); + FEXCore::Config::Set(FEXCore::Config::CONFIG_APP_CONFIG_NAME, ExecutableName); FEXCore::Config::Set(FEXCore::Config::CONFIG_IS64BIT_MODE, "1"); diff --git a/Source/Windows/WOW64/Module.cpp b/Source/Windows/WOW64/Module.cpp index 515a553b7..75503c82d 100644 --- a/Source/Windows/WOW64/Module.cpp +++ b/Source/Windows/WOW64/Module.cpp @@ -515,13 +515,16 @@ public: void BTCpuProcessInit() { FEX::Windows::InitCRTProcess(); - const auto ExecutableName = FEX::Windows::BaseName(FEX::Windows::GetExecutableFilePath()); + const auto ExecutablePath = FEX::Windows::GetExecutableFilePath(); + const auto ExecutableName = FEX::Windows::BaseName(ExecutablePath); FEX::Config::LoadConfig(fextl::string {ExecutableName}, _environ, FEX::ReadPortabilityInformation()); FEXCore::Config::ReloadMetaLayer(); FEX::Windows::Logging::Init(); FEXCore::Config::Set(FEXCore::Config::CONFIG_INTERPRETER_INSTALLED, "0"); FEXCore::Config::Set(FEXCore::Config::CONFIG_IS64BIT_MODE, "0"); + FEXCore::Config::Set(FEXCore::Config::CONFIG_APP_FILENAME, ExecutablePath); + FEXCore::Config::Set(FEXCore::Config::CONFIG_APP_CONFIG_NAME, ExecutableName); FEXCore::Profiler::Init("", "");