Skip to content

Commit

Permalink
dayz-library: fix Flatpak empty environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
muttleyxd committed Mar 6, 2022
1 parent 864deae commit 164bf27
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/dayz-linux-launcher-library/dayzclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,16 @@ namespace
bool disable_esync)
{
spdlog::trace("{}:{}", __PRETTY_FUNCTION__, __LINE__);

auto const environment_variables = StringUtils::trim(fmt::format("{} {}", get_esync_prefix(disable_esync),
user_environment_variables));
std::string envvar_parameter = "";
if (environment_variables.empty() == false)
envvar_parameter = fmt::format("--env\"{}\"", environment_variables);

StdUtils::StartBackgroundProcess(
fmt::format("flatpak run --env=\"{} {}\" com.valvesoftware.Steam -applaunch 221100 -nolauncher {}",
get_esync_prefix(disable_esync), user_environment_variables, arguments));
fmt::format("flatpak run {} com.valvesoftware.Steam -applaunch 221100 -nolauncher {}",
envvar_parameter, user_environment_variables, arguments));
}

void indirect_launch(string const &arguments, string const &user_environment_variables,
Expand Down

0 comments on commit 164bf27

Please sign in to comment.