about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/core.c12
-rw-r--r--src/include/debug.h1
-rwxr-xr-xsrc/wrapped32/wrappedcrashhandler.c2
3 files changed, 11 insertions, 4 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
diff --git a/src/include/debug.h b/src/include/debug.h
index 1ecf5b4e..fd3f23c0 100644
--- a/src/include/debug.h
+++ b/src/include/debug.h
@@ -108,6 +108,7 @@ extern int box64_mapclean;
 extern int box64_prefer_wrapped;
 extern int box64_prefer_emulated;
 extern int box64_steam;
+extern int box64_steamcmd;
 extern int box64_wine;
 extern int box64_musl;
 extern int box64_nopulse;   // disabling the use of wrapped pulseaudio
diff --git a/src/wrapped32/wrappedcrashhandler.c b/src/wrapped32/wrappedcrashhandler.c
index ed9b3b1e..2a205298 100755
--- a/src/wrapped32/wrappedcrashhandler.c
+++ b/src/wrapped32/wrappedcrashhandler.c
@@ -21,7 +21,7 @@ static const char* crashhandlerName = "crashhandler.so";
 #define LIBNAME crashhandler
 
 #define PRE_INIT                                                \
-    if(!box64_steam)                                            \
+    if(!(box64_steam || box64_steamcmd))                        \
         return -1;                                              \
     if(1)                                                       \
         lib->w.lib = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL);\