Use RoInitialize/RoUninitialize for Windows.Gaming.Input

Thanks @walbourn!

Fixes https://github.com/libsdl-org/SDL/issues/5270
This commit is contained in:
Sam Lantinga
2022-04-01 14:58:33 -07:00
parent 1c9299b00d
commit 8ebef12d31
4 changed files with 68 additions and 78 deletions

View File

@@ -63,10 +63,17 @@ extern int WIN_SetErrorFromHRESULT(const char *prefix, HRESULT hr);
/* Sets an error message based on GetLastError(). Always return -1. */
extern int WIN_SetError(const char *prefix);
/* Load a function from combase.dll */
void *WIN_LoadComBaseFunction(const char *name);
/* Wrap up the oddities of CoInitialize() into a common function. */
extern HRESULT WIN_CoInitialize(void);
extern void WIN_CoUninitialize(void);
/* Wrap up the oddities of RoInitialize() into a common function. */
extern HRESULT WIN_RoInitialize(void);
extern void WIN_RoUninitialize(void);
/* Returns SDL_TRUE if we're running on Windows Vista and newer */
extern BOOL WIN_IsWindowsVistaOrGreater(void);