aboutsummaryrefslogtreecommitdiff
path: root/src/steam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/steam.c')
-rw-r--r--src/steam.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/steam.c b/src/steam.c
index 83d05ce..85c9511 100644
--- a/src/steam.c
+++ b/src/steam.c
@@ -261,11 +261,14 @@ int runOpenFortress(char** args, size_t arg_count)
char** argv = malloc(sizeof(char*) * (arg_count + 6));
+#ifdef _WIN32
size_t of_dir_len = strlen(of_dir);
of_dir = realloc(of_dir, of_dir_len + 3);
memmove(of_dir+1, of_dir, of_dir_len);
of_dir[0] = '"';
of_dir[of_dir_len+1] = '"';
+ of_dir[of_dir_len+2] = '\0';
+#endif
argv[0] = game;
argv[1] = "-game";
@@ -300,6 +303,15 @@ int runOpenFortress(char** args, size_t arg_count)
char** argv = malloc(sizeof(char*) * (arg_count + 8));
+#ifdef _WIN32
+ size_t of_dir_len = strlen(of_dir);
+ of_dir = realloc(of_dir, of_dir_len + 3);
+ memmove(of_dir+1, of_dir, of_dir_len);
+ of_dir[0] = '"';
+ of_dir[of_dir_len+1] = '"';
+ of_dir[of_dir_len+2] = '\0';
+#endif
+
argv[0] = steam;
argv[1] = "-applaunch";
argv[2] = "243750";