Skip to content
Permalink
Browse files

windows: Fix calls to CoCreateInstance() so last parameter is a LPVOI…

…D *.
  • Loading branch information
icculus committed May 20, 2020
1 parent 539125b commit 68777406e57c52e5d5781bd6e22450e5ebaff256
@@ -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);
@@ -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);
@@ -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);
@@ -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);
}

0 comments on commit 6877740

Please sign in to comment.