mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
windows: Fix calls to CoCreateInstance() so last parameter is a LPVOID *.
This commit is contained in:
parent
539125b895
commit
68777406e5
@ -247,7 +247,7 @@ WASAPI_PlatformInit(void)
|
|||||||
return SDL_SetError("WASAPI: CoInitialize() failed");
|
return SDL_SetError("WASAPI: CoInitialize() failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = CoCreateInstance(&SDL_CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &SDL_IID_IMMDeviceEnumerator, (LPVOID) &enumerator);
|
ret = CoCreateInstance(&SDL_CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &SDL_IID_IMMDeviceEnumerator, (LPVOID *) &enumerator);
|
||||||
if (FAILED(ret)) {
|
if (FAILED(ret)) {
|
||||||
WIN_CoUninitialize();
|
WIN_CoUninitialize();
|
||||||
return WIN_SetErrorFromHRESULT("WASAPI CoCreateInstance(MMDeviceEnumerator)", ret);
|
return WIN_SetErrorFromHRESULT("WASAPI CoCreateInstance(MMDeviceEnumerator)", ret);
|
||||||
|
@ -87,7 +87,7 @@ SDL_DINPUT_HapticInit(void)
|
|||||||
coinitialized = SDL_TRUE;
|
coinitialized = SDL_TRUE;
|
||||||
|
|
||||||
ret = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER,
|
ret = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER,
|
||||||
&IID_IDirectInput8, (LPVOID)& dinput);
|
&IID_IDirectInput8, (LPVOID *) &dinput);
|
||||||
if (FAILED(ret)) {
|
if (FAILED(ret)) {
|
||||||
SDL_SYS_HapticQuit();
|
SDL_SYS_HapticQuit();
|
||||||
return DI_SetError("CoCreateInstance", ret);
|
return DI_SetError("CoCreateInstance", ret);
|
||||||
|
@ -509,7 +509,7 @@ SDL_DINPUT_JoystickInit(void)
|
|||||||
coinitialized = SDL_TRUE;
|
coinitialized = SDL_TRUE;
|
||||||
|
|
||||||
result = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER,
|
result = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER,
|
||||||
&IID_IDirectInput8, (LPVOID)&dinput);
|
&IID_IDirectInput8, (LPVOID *)&dinput);
|
||||||
|
|
||||||
if (FAILED(result)) {
|
if (FAILED(result)) {
|
||||||
return SetDIerror("CoCreateInstance", result);
|
return SetDIerror("CoCreateInstance", result);
|
||||||
|
@ -351,7 +351,7 @@ SDL_WINDOWS_SensorInit(void)
|
|||||||
SDL_windowscoinit = SDL_TRUE;
|
SDL_windowscoinit = SDL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = CoCreateInstance(&CLSID_SensorManager, NULL, CLSCTX_INPROC_SERVER, &IID_SensorManager, &SDL_sensor_manager);
|
hr = CoCreateInstance(&CLSID_SensorManager, NULL, CLSCTX_INPROC_SERVER, &IID_SensorManager, (LPVOID *) &SDL_sensor_manager);
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
return SDL_SetError("Couldn't create the sensor manager: 0x%.4x", hr);
|
return SDL_SetError("Couldn't create the sensor manager: 0x%.4x", hr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user