Browse Source

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.
Miku AuahDark 5 years ago
parent
commit
886724eb94
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libs/SDL2/src/joystick/windows/SDL_dinputjoystick.c

+ 2 - 2
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;