src/joystick/windows/SDL_dinputjoystick.c
changeset 10600 ae286e502a00
parent 10595 9da2701eeb4a
child 10724 5ea5f198879f
equal deleted inserted replaced
10599:ade40eb390dc 10600:ae286e502a00
   401         sizeof(DIDEVICEINSTANCE));
   401         sizeof(DIDEVICEINSTANCE));
   402 
   402 
   403     SDL_memset(pNewJoystick->guid.data, 0, sizeof(pNewJoystick->guid.data));
   403     SDL_memset(pNewJoystick->guid.data, 0, sizeof(pNewJoystick->guid.data));
   404 
   404 
   405     guid16 = (Uint16 *)pNewJoystick->guid.data;
   405     guid16 = (Uint16 *)pNewJoystick->guid.data;
   406     if (SDL_memcmp(&pdidInstance->guidProduct.Data4[2], "VIDPID", 6) == 0) {
   406     if (SDL_memcmp(&pdidInstance->guidProduct.Data4[2], "PIDVID", 6) == 0) {
   407         *guid16++ = SDL_SwapLE16(BUS_USB);
   407         *guid16++ = SDL_SwapLE16(BUS_USB);
   408         *guid16++ = 0;
   408         *guid16++ = 0;
   409         *guid16++ = SDL_SwapLE16((Uint16)LOWORD(pdidInstance->guidProduct.Data1)); /* vendor */
   409         *guid16++ = SDL_SwapLE16((Uint16)LOWORD(pdidInstance->guidProduct.Data1)); /* vendor */
   410         *guid16++ = 0;
   410         *guid16++ = 0;
   411         *guid16++ = SDL_SwapLE16((Uint16)HIWORD(pdidInstance->guidProduct.Data1)); /* product */
   411         *guid16++ = SDL_SwapLE16((Uint16)HIWORD(pdidInstance->guidProduct.Data1)); /* product */