about summary refs log tree commit diff stats
path: root/src/core.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-08-30 10:13:42 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-08-30 10:13:42 +0200
commit371b45c4200b91de93250fbfa84b185350d7b323 (patch)
treed4881f4cefd96852fa0cb9e6d01631ae6d132b41 /src/core.c
parent4dcf14d02661948eb3322f24cbba72a1bd944fc9 (diff)
downloadbox64-371b45c4200b91de93250fbfa84b185350d7b323.tar.gz
box64-371b45c4200b91de93250fbfa84b185350d7b323.zip
[BOX32] Added detection of steam and steamcmd
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core.c b/src/core.c
index db4ea773..2fda5c2e 100644
--- a/src/core.c
+++ b/src/core.c
@@ -171,6 +171,7 @@ int box64_dummy_crashhandler = 1;
 int box64_mapclean = 0;
 int box64_zoom = 0;
 int box64_steam = 0;
+int box64_steamcmd = 0;
 int box64_wine = 0;
 int box64_musl = 0;
 int box64_nopulse = 0;
@@ -1918,9 +1919,14 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf
         }
         ++nextarg;
         prog = argv[nextarg];
-    }
-    // check if this is wineserver
-    if(!strcmp(prog, "wineserver") || !strcmp(prog, "wineserver64") || (strlen(prog)>9 && !strcmp(prog+strlen(prog)-strlen("/wineserver"), "/wineserver"))) {
+    } else if(!strcmp(prog, "steam") || (strrchr(prog, '/') && !strcmp(strrchr(prog,'/'), "/steam"))) {
+        printf_log(LOG_INFO, "steam detected\n");
+        box64_steam = 1;
+    } else if(!strcmp(prog, "steamcmd") || (strrchr(prog, '/') && !strcmp(strrchr(prog,'/'), "/steamcmd"))) {
+        printf_log(LOG_INFO, "steamcmd detected\n");
+        box64_steamcmd = 1;
+    } else  if(!strcmp(prog, "wineserver") || !strcmp(prog, "wineserver64") || (strlen(prog)>9 && !strcmp(prog+strlen(prog)-strlen("/wineserver"), "/wineserver"))) {
+        // check if this is wineserver
         box64_wine = 1;
     }
     // Create a new context