about summary refs log tree commit diff stats
path: root/src/wrapped
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/wrapped
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/wrapped')
-rw-r--r--src/wrapped/wrappedsdl2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wrapped/wrappedsdl2.c b/src/wrapped/wrappedsdl2.c
index 080e9bd5..cf745119 100644
--- a/src/wrapped/wrappedsdl2.c
+++ b/src/wrapped/wrappedsdl2.c
@@ -801,8 +801,9 @@ EXPORT void* my2_SDL_Vulkan_GetVkGetInstanceProcAddr(x64emu_t* emu)
 
 EXPORT void my2_SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, uint16_t *vend, uint16_t *prod, uint16_t *ver, uint16_t* crc16)
 {
+    uint16_t dummy = 0;
     if(my->SDL_GetJoystickGUIDInfo)
-        my->SDL_GetJoystickGUIDInfo(guid, vend, prod, ver, crc16);
+        my->SDL_GetJoystickGUIDInfo(guid, vend, prod, ver, box64_sdl2_jguid?(&dummy):crc16);
     // fallback
     else {
         uint16_t *guid16 = (uint16_t *)guid.data;