From 68777406e57c52e5d5781bd6e22450e5ebaff256 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 20 May 2020 16:58:33 -0400 Subject: [PATCH] windows: Fix calls to CoCreateInstance() so last parameter is a LPVOID *. --- src/audio/wasapi/SDL_wasapi_win32.c | 2 +- src/haptic/windows/SDL_dinputhaptic.c | 2 +- src/joystick/windows/SDL_dinputjoystick.c | 2 +- src/sensor/windows/SDL_windowssensor.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/audio/wasapi/SDL_wasapi_win32.c b/src/audio/wasapi/SDL_wasapi_win32.c index 2da39323a..4f8bb7cae 100644 --- a/src/audio/wasapi/SDL_wasapi_win32.c +++ b/src/audio/wasapi/SDL_wasapi_win32.c @@ -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); diff --git a/src/haptic/windows/SDL_dinputhaptic.c b/src/haptic/windows/SDL_dinputhaptic.c index 019e50865..4b9e5e069 100644 --- a/src/haptic/windows/SDL_dinputhaptic.c +++ b/src/haptic/windows/SDL_dinputhaptic.c @@ -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); diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c index cbb5bd945..5d777a829 100644 --- a/src/joystick/windows/SDL_dinputjoystick.c +++ b/src/joystick/windows/SDL_dinputjoystick.c @@ -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); diff --git a/src/sensor/windows/SDL_windowssensor.c b/src/sensor/windows/SDL_windowssensor.c index 1a7007942..c57e88f70 100644 --- a/src/sensor/windows/SDL_windowssensor.c +++ b/src/sensor/windows/SDL_windowssensor.c @@ -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); }