Fixed compiler warnings
authorSam Lantinga <slouken@libsdl.org>
Fri, 13 Mar 2020 09:43:48 -0700
changeset 1361365d1b7b419a2
parent 13612 66b28c199af1
child 13614 a2bfecfe4ec2
Fixed compiler warnings
src/joystick/windows/SDL_dinputjoystick.c
src/joystick/windows/SDL_xinputjoystick.c
     1.1 --- a/src/joystick/windows/SDL_dinputjoystick.c	Thu Mar 12 19:49:33 2020 -0700
     1.2 +++ b/src/joystick/windows/SDL_dinputjoystick.c	Fri Mar 13 09:43:48 2020 -0700
     1.3 @@ -244,7 +244,7 @@
     1.4  static const IID IID_IWbemLocator = { 0xdc12a687, 0x737f, 0x11cf,{ 0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24 } };
     1.5  
     1.6  static SDL_bool
     1.7 -WIN_IsXInputDevice(LPTSTR *name, const GUID* pGuidProductFromDirectInput)
     1.8 +WIN_IsXInputDevice(const WCHAR *name, const GUID* pGuidProductFromDirectInput)
     1.9  {
    1.10      IWbemLocator*           pIWbemLocator = NULL;
    1.11      IEnumWbemClassObject*   pEnumDevices = NULL;
    1.12 @@ -263,7 +263,7 @@
    1.13          return SDL_FALSE;
    1.14      }
    1.15  
    1.16 -    if (SDL_wcsstr(name, " XINPUT ") != NULL) {
    1.17 +    if (SDL_wcsstr(name, L" XINPUT ") != NULL) {
    1.18          /* This is a duplicate interface for a controller that will show up with XInput,
    1.19             e.g. Xbox One Elite Series 2 in Bluetooth mode.
    1.20           */
    1.21 @@ -374,7 +374,7 @@
    1.22  #endif /* 0 */
    1.23  
    1.24  static SDL_bool
    1.25 -SDL_IsXInputDevice(LPTSTR *name, const GUID* pGuidProductFromDirectInput)
    1.26 +SDL_IsXInputDevice(const WCHAR *name, const GUID* pGuidProductFromDirectInput)
    1.27  {
    1.28      UINT i;
    1.29  
    1.30 @@ -382,7 +382,7 @@
    1.31          return SDL_FALSE;
    1.32      }
    1.33  
    1.34 -    if (SDL_wcsstr(name, " XINPUT ") != NULL) {
    1.35 +    if (SDL_wcsstr(name, L" XINPUT ") != NULL) {
    1.36          /* This is a duplicate interface for a controller that will show up with XInput,
    1.37             e.g. Xbox One Elite Series 2 in Bluetooth mode.
    1.38           */
     2.1 --- a/src/joystick/windows/SDL_xinputjoystick.c	Thu Mar 12 19:49:33 2020 -0700
     2.2 +++ b/src/joystick/windows/SDL_xinputjoystick.c	Fri Mar 13 09:43:48 2020 -0700
     2.3 @@ -220,7 +220,6 @@
     2.4      Uint16 vendor = 0;
     2.5      Uint16 product = 0;
     2.6      Uint16 version = 0;
     2.7 -    const char *name;
     2.8      JoyStick_DeviceData *pPrevJoystick = NULL;
     2.9      JoyStick_DeviceData *pNewJoystick = *pContext;
    2.10