about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-11-05 14:23:54 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-11-05 14:23:54 +0100
commitcc661c75493a94aede5839456acbc37d1a40b3f1 (patch)
tree060468ef100cbc96f49e6bb58c412c4e388dad86 /src/main.c
parent6982846f506237536627650271d5fdd2ed5a0092 (diff)
downloadbox64-cc661c75493a94aede5839456acbc37d1a40b3f1.tar.gz
box64-cc661c75493a94aede5839456acbc37d1a40b3f1.zip
Added BOX64_INPROCESSGPU setting (helps Heroic 2.10 at least)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 9868a821..a44f5940 100644
--- a/src/main.c
+++ b/src/main.c
@@ -46,6 +46,7 @@ int box64_dynarec_log = LOG_NONE;
 uintptr_t box64_pagesize;
 uintptr_t box64_load_addr = 0;
 int box64_nosandbox = 0;
+int box64_inprocessgpu = 0;
 int box64_malloc_hack = 0;
 #ifdef DYNAREC
 int box64_dynarec = 1;
@@ -1666,6 +1667,19 @@ int main(int argc, const char **argv, char **env) {
             my_context->argc++;
         }
     }
+    if(box64_inprocessgpu)
+    {
+        // check if in-process-gpu is already there
+        int there = 0;
+        for(int i=1; i<my_context->argc && !there; ++i)
+            if(!strcmp(my_context->argv[i], "--in-process-gpu"))
+                there = 1;
+        if(!there) {
+            my_context->argv = (char**)box_realloc(my_context->argv, (my_context->argc+1)*sizeof(char*));
+            my_context->argv[my_context->argc] = box_strdup("--in-process-gpu");
+            my_context->argc++;
+        }
+    }
 
     // check if file exist
     if(!my_context->argv[0] || !FileExist(my_context->argv[0], IS_FILE)) {