From 886724eb9411bfef3625bd93f16c7ec5d9606b8a Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Thu, 3 Dec 2020 12:55:55 +0800 Subject: [PATCH] SDL: Apply revision 40ea0350f044 to fix implicit memcpy() when compiling for Windows ARM64 https://hg.libsdl.org/SDL/rev/40ea0350f044 A better solution would be to update SDL to latest release, but this is unnecessary at the moment. --- libs/SDL2/src/joystick/windows/SDL_dinputjoystick.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/SDL2/src/joystick/windows/SDL_dinputjoystick.c b/libs/SDL2/src/joystick/windows/SDL_dinputjoystick.c index 5b3089b6..0082618e 100644 --- a/libs/SDL2/src/joystick/windows/SDL_dinputjoystick.c +++ b/libs/SDL2/src/joystick/windows/SDL_dinputjoystick.c @@ -478,8 +478,8 @@ EnumJoysticksCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext) pPrevJoystick->pNext = pNewJoystick->pNext; } - // Update with new guid/etc, if it has changed - pNewJoystick->dxdevice = *pdidInstance; + /* Update with new guid/etc, if it has changed */ + SDL_memcpy(&pNewJoystick->dxdevice, pdidInstance, sizeof(DIDEVICEINSTANCE)); pNewJoystick->pNext = SYS_Joystick; SYS_Joystick = pNewJoystick;