windows: Fix calls to CoCreateInstance() so last parameter is a LPVOID *.

This commit is contained in:
Ryan C. Gordon 2020-05-20 16:58:33 -04:00
parent 539125b895
commit 68777406e5
4 changed files with 4 additions and 4 deletions

View File

@ -247,7 +247,7 @@ WASAPI_PlatformInit(void)
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)) {
WIN_CoUninitialize();
return WIN_SetErrorFromHRESULT("WASAPI CoCreateInstance(MMDeviceEnumerator)", ret);

View File

@ -87,7 +87,7 @@ SDL_DINPUT_HapticInit(void)
coinitialized = SDL_TRUE;
ret = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectInput8, (LPVOID)& dinput);
&IID_IDirectInput8, (LPVOID *) &dinput);
if (FAILED(ret)) {
SDL_SYS_HapticQuit();
return DI_SetError("CoCreateInstance", ret);

View File

@ -509,7 +509,7 @@ SDL_DINPUT_JoystickInit(void)
coinitialized = SDL_TRUE;
result = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectInput8, (LPVOID)&dinput);
&IID_IDirectInput8, (LPVOID *)&dinput);
if (FAILED(result)) {
return SetDIerror("CoCreateInstance", result);

View File

@ -351,7 +351,7 @@ SDL_WINDOWS_SensorInit(void)
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)) {
return SDL_SetError("Couldn't create the sensor manager: 0x%.4x", hr);
}