diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-03-08 16:40:35 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-03-08 16:40:35 +0100 |
| commit | e05796674bd7648faa4bbb4d61de2e641bed34b9 (patch) | |
| tree | 7d38c44b030c69de44fc9988840832999d7d719c /src/main.c | |
| parent | 0ce169e7f55a84eef801fec61e352c800ac8e5e6 (diff) | |
| parent | 726af707ebe92f0f1a98ea985343f6641fa45ba8 (diff) | |
| download | box64-e05796674bd7648faa4bbb4d61de2e641bed34b9.tar.gz box64-e05796674bd7648faa4bbb4d61de2e641bed34b9.zip | |
Merge branch 'main' of https://github.com/ptitSeb/box64 into main
Diffstat (limited to 'src/main.c')
| -rwxr-xr-x | src/main.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index d344a1c9..34d2f58d 100755 --- a/src/main.c +++ b/src/main.c @@ -74,12 +74,14 @@ int x11glx = 1; int allow_missing_libs = 0; int box64_prefer_wrapped = 0; int fix_64bit_inodes = 0; +int box64_mapclean = 0; int box64_zoom = 0; int box64_steam = 0; int box64_wine = 0; int box64_nopulse = 0; int box64_nogtk = 0; int box64_novulkan = 0; +int box64_showsegv = 0; char* libGL = NULL; uintptr_t fmod_smc_start = 0; uintptr_t fmod_smc_end = 0; @@ -547,6 +549,15 @@ void LoadLogEnv() if(jit_gdb) printf_log(LOG_INFO, "Launch %s on segfault\n", (jit_gdb==2)?"gdbserver":"gdb"); } + p = getenv("BOX64_SHOWSEGV"); + if(p) { + if(strlen(p)==1) { + if(p[0]>='0' && p[0]<='0'+1) + box64_showsegv = p[0]-'0'; + } + if(box64_showsegv) + printf_log(LOG_INFO, "Show Segfault signal even if a signal handler is present\n"); + } box64_pagesize = sysconf(_SC_PAGESIZE); if(!box64_pagesize) box64_pagesize = 4096; @@ -675,6 +686,7 @@ void PrintHelp() { printf(" BOX64_LOAD_ADDR=0xXXXXXX try to load at 0xXXXXXX main binary (if binary is a PIE)\n"); printf(" BOX64_NOSIGSEGV=1 to disable handling of SigSEGV\n"); printf(" BOX64_NOSIGILL=1 to disable handling of SigILL\n"); + printf(" BOX64_SHOWSEGV=1 to show Segfault signal even if a signal handler is present\n"); printf(" BOX64_X11THREADS=1 to call XInitThreads when loading X11 (for old Loki games with Loki_Compat lib)"); printf(" BOX64_LIBGL=libXXXX set the name (and optionnaly full path) for libGL.so.1\n"); printf(" BOX64_LD_PRELOAD=XXXX[:YYYYY] force loading XXXX (and YYYY...) libraries with the binary\n"); @@ -1054,6 +1066,9 @@ int main(int argc, const char **argv, const char **env) { prgname = prog; else ++prgname; + if(box64_wine) { + AddPath("libdl.so.2", &ld_preload, 0); + } // special case for dontstarve that use an old SDL2 if(strstr(prgname, "dontstarve")) { printf_log(LOG_INFO, "Dontstarve* detected, forcing emulated SDL2\n"); |