diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-11-05 14:23:54 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-11-05 14:23:54 +0100 |
| commit | cc661c75493a94aede5839456acbc37d1a40b3f1 (patch) | |
| tree | 060468ef100cbc96f49e6bb58c412c4e388dad86 /src | |
| parent | 6982846f506237536627650271d5fdd2ed5a0092 (diff) | |
| download | box64-cc661c75493a94aede5839456acbc37d1a40b3f1.tar.gz box64-cc661c75493a94aede5839456acbc37d1a40b3f1.zip | |
Added BOX64_INPROCESSGPU setting (helps Heroic 2.10 at least)
Diffstat (limited to 'src')
| -rw-r--r-- | src/include/debug.h | 1 | ||||
| -rw-r--r-- | src/main.c | 14 | ||||
| -rw-r--r-- | src/tools/rcfile.c | 3 |
3 files changed, 18 insertions, 0 deletions
diff --git a/src/include/debug.h b/src/include/debug.h index 59c608cd..53afd3f6 100644 --- a/src/include/debug.h +++ b/src/include/debug.h @@ -70,6 +70,7 @@ extern char* box64_trace; extern uint64_t start_cnt; #endif extern int box64_nosandbox; +extern int box64_inprocessgpu; extern int box64_malloc_hack; extern int box64_dummy_crashhandler; extern int box64_sse_flushto0; 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)) { diff --git a/src/tools/rcfile.c b/src/tools/rcfile.c index 3ea788d8..874edffe 100644 --- a/src/tools/rcfile.c +++ b/src/tools/rcfile.c @@ -40,6 +40,7 @@ static const char default_rcfile[] = "\n" "[heroic]\n" "BOX64_NOSANDBOX=1\n" +"BOX64_INPROCESSGPU=1\n" "BOX64_MALLOC_HACK=2\n" "\n" "[LotCG.x86_64]\n" @@ -59,6 +60,7 @@ static const char default_rcfile[] = "\n" "[steamwebhelper]\n" "BOX64_NOSANDBOX=1\n" +"BOX64_INPROCESSGPU=1\n" "BOX64_MALLOC_HACK=2\n" "BOX64_LOG=0\n" "BOX64_DYNAREC_BIGBLOCK=0\n" @@ -101,6 +103,7 @@ ENTRYBOOL(BOX64_NOVULKAN, box64_novulkan) \ ENTRYSTRING_(BOX64_BASH, bash) \ ENTRYINT(BOX64_JITGDB, jit_gdb, 0, 2, 2) \ ENTRYBOOL(BOX64_NOSANDBOX, box64_nosandbox) \ +ENTRYBOOL(BOX64_INPROCESSGPU, box64_inprocessgpu) \ ENTRYBOOL(BOX64_EXIT, want_exit) \ ENTRYBOOL(BOX64_LIBCEF, box64_libcef) \ ENTRYBOOL(BOX64_SDL2_JGUID, box64_sdl2_jguid) \ |