about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-10-11 12:15:05 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-10-11 12:15:05 +0200
commit0499c38466ca094b230ec6c825ec96ddcd987892 (patch)
tree47a4debd9df897c7523059999686b2c994dfe2e4 /src/main.c
parent3e18d5ea57c5da660e28acf08127d46336d4d0a0 (diff)
downloadbox64-0499c38466ca094b230ec6c825ec96ddcd987892.tar.gz
box64-0499c38466ca094b230ec6c825ec96ddcd987892.zip
Added BOX64_SDL2_JGUID, a workaround for game using old SDL_GetJoystickGUIDInfo funciton on recent wrapped SDL2 (for #1018)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 90e3575d..47cff957 100644
--- a/src/main.c
+++ b/src/main.c
@@ -93,6 +93,7 @@ int rv64_xtheadfmv = 0;
 int box64_dynarec = 0;
 #endif
 int box64_libcef = 1;
+int box64_sdl2_jguid = 0;
 int dlsym_error = 0;
 int cycle_log = 0;
 #ifdef HAVE_TRACE
@@ -718,7 +719,16 @@ void LoadLogEnv()
                 box64_libcef = p[0]-'0';
         }
         if(!box64_libcef)
-            printf_log(LOG_INFO, "Dynarec will not detect libcef\n");
+            printf_log(LOG_INFO, "BOX64 will not detect libcef\n");
+    }
+    p = getenv("BOX64_SDL2_JGUID");
+    if(p) {
+        if(strlen(p)==1) {
+            if(p[0]>='0' && p[0]<='1')
+                box64_sdl2_jguid = p[0]-'0';
+        }
+        if(!box64_sdl2_jguid)
+            printf_log(LOG_INFO, "BOX64 will workaround the use of  SDL_GetJoystickGUIDInfo with 4 args instead of 5\n");
     }
     p = getenv("BOX64_LOAD_ADDR");
     if(p) {