mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-06-22 08:31:07 +00:00
fix various commandline argument related things
This commit is contained in:
+2
-2
@@ -107,7 +107,7 @@ void StartGame(std::string Dir) {
|
||||
void StartGame(std::string Dir) {
|
||||
int status;
|
||||
std::string filename = (Dir + "/BinLinux/BeamNG.drive.x64");
|
||||
std::vector<char*> argv;
|
||||
std::vector<const char*> argv;
|
||||
argv.push_back(filename.data());
|
||||
for (int i = 0; i < options.game_arguments_length; i++) {
|
||||
argv.push_back(options.game_arguments[i]);
|
||||
@@ -119,7 +119,7 @@ void StartGame(std::string Dir) {
|
||||
posix_spawn_file_actions_init(&spawn_actions);
|
||||
posix_spawn_file_actions_addclose(&spawn_actions, STDOUT_FILENO);
|
||||
posix_spawn_file_actions_addclose(&spawn_actions, STDERR_FILENO);
|
||||
int result = posix_spawn(&pid, filename.c_str(), &spawn_actions, nullptr, argv.data(), environ);
|
||||
int result = posix_spawn(&pid, filename.c_str(), &spawn_actions, nullptr, const_cast<char**>(argv.data()), environ);
|
||||
|
||||
if (result != 0) {
|
||||
error("Failed to Launch the game! launcher closing soon");
|
||||
|
||||
Reference in New Issue
Block a user