sensor: Fixed compiler warnings on mingw64.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 21 May 2020 03:52:48 -0400
changeset 138443c44ba7a04fd
parent 13843 cbd001bb0b89
child 13845 210fb62f0c96
sensor: Fixed compiler warnings on mingw64.
src/sensor/windows/SDL_windowssensor.c
     1.1 --- a/src/sensor/windows/SDL_windowssensor.c	Thu May 21 03:48:56 2020 -0400
     1.2 +++ b/src/sensor/windows/SDL_windowssensor.c	Thu May 21 03:52:48 2020 -0400
     1.3 @@ -261,12 +261,12 @@
     1.4  
     1.5      hr = ISensor_GetID(sensor, &sensor_id);
     1.6      if (FAILED(hr)) {
     1.7 -        return SDL_SetError("Couldn't get sensor ID: 0x%.4x", hr);
     1.8 +        return WIN_SetErrorFromHRESULT("Couldn't get sensor ID", hr);
     1.9      }
    1.10  
    1.11      hr = ISensor_GetType(sensor, &type_id);
    1.12      if (FAILED(hr)) {
    1.13 -        return SDL_SetError("Couldn't get sensor type: 0x%.4x", hr);
    1.14 +        return WIN_SetErrorFromHRESULT("Couldn't get sensor type", hr);
    1.15      }
    1.16  
    1.17      if (WIN_IsEqualIID(&type_id, &SENSOR_TYPE_ACCELEROMETER_3D)) {
    1.18 @@ -351,13 +351,13 @@
    1.19  
    1.20      hr = CoCreateInstance(&SDL_CLSID_SensorManager, NULL, CLSCTX_INPROC_SERVER, &SDL_IID_SensorManager, (LPVOID *) &SDL_sensor_manager);
    1.21      if (FAILED(hr)) {
    1.22 -        return SDL_SetError("Couldn't create the sensor manager: 0x%.4x", hr);
    1.23 +        return WIN_SetErrorFromHRESULT("Couldn't create the sensor manager", hr);
    1.24      }
    1.25  
    1.26      hr = ISensorManager_SetEventSink(SDL_sensor_manager, &sensor_manager_events);
    1.27      if (FAILED(hr)) {
    1.28          ISensorManager_Release(SDL_sensor_manager);
    1.29 -        return SDL_SetError("Couldn't set the sensor manager event sink: 0x%.4x", hr);
    1.30 +        return WIN_SetErrorFromHRESULT("Couldn't set the sensor manager event sink", hr);
    1.31      }
    1.32  
    1.33      hr = ISensorManager_GetSensorsByCategory(SDL_sensor_manager, &SENSOR_CATEGORY_ALL, &sensor_collection);