early-access version 2281
This commit is contained in:
2
externals/SDL/src/sensor/SDL_sensor.c
vendored
2
externals/SDL/src/sensor/SDL_sensor.c
vendored
@@ -39,7 +39,7 @@ static SDL_SensorDriver *SDL_sensor_drivers[] = {
|
||||
&SDL_COREMOTION_SensorDriver,
|
||||
#endif
|
||||
#ifdef SDL_SENSOR_WINDOWS
|
||||
&SDL_WINDOWS_SensorDriver,
|
||||
&SDL_WINDOWS_SensorDriver,
|
||||
#endif
|
||||
#if defined(SDL_SENSOR_DUMMY) || defined(SDL_SENSOR_DISABLED)
|
||||
&SDL_DUMMY_SensorDriver
|
||||
|
@@ -352,12 +352,14 @@ SDL_WINDOWS_SensorInit(void)
|
||||
|
||||
hr = CoCreateInstance(&SDL_CLSID_SensorManager, NULL, CLSCTX_INPROC_SERVER, &SDL_IID_SensorManager, (LPVOID *) &SDL_sensor_manager);
|
||||
if (FAILED(hr)) {
|
||||
return WIN_SetErrorFromHRESULT("Couldn't create the sensor manager", hr);
|
||||
/* If we can't create a sensor manager (i.e. on Wine), we won't have any sensors, but don't fail the init */
|
||||
return 0; /* WIN_SetErrorFromHRESULT("Couldn't create the sensor manager", hr); */
|
||||
}
|
||||
|
||||
hr = ISensorManager_SetEventSink(SDL_sensor_manager, &sensor_manager_events);
|
||||
if (FAILED(hr)) {
|
||||
ISensorManager_Release(SDL_sensor_manager);
|
||||
SDL_sensor_manager = NULL;
|
||||
return WIN_SetErrorFromHRESULT("Couldn't set the sensor manager event sink", hr);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user