From 0499c38466ca094b230ec6c825ec96ddcd987892 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 11 Oct 2023 12:15:05 +0200 Subject: Added BOX64_SDL2_JGUID, a workaround for game using old SDL_GetJoystickGUIDInfo funciton on recent wrapped SDL2 (for #1018) --- src/wrapped/wrappedsdl2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/wrapped') 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; -- cgit 1.4.1