Define SDL_PLATFORM_* macros instead of underscored ones (#8875)

This commit is contained in:
Anonymous Maarten
2024-01-24 02:40:51 +01:00
committed by GitHub
parent ceccf24519
commit 31d133db40
208 changed files with 1293 additions and 1138 deletions

View File

@@ -603,7 +603,7 @@ static int WGI_JoystickInit(void)
return SDL_SetError("RoInitialize() failed");
}
#ifdef __WINRT__
#ifdef SDL_PLATFORM_WINRT
wgi.CoIncrementMTAUsage = CoIncrementMTAUsage;
wgi.RoGetActivationFactory = RoGetActivationFactory;
wgi.WindowsCreateStringReference = WindowsCreateStringReference;
@@ -617,9 +617,9 @@ static int WGI_JoystickInit(void)
RESOLVE(WindowsDeleteString);
RESOLVE(WindowsGetStringRawBuffer);
#undef RESOLVE
#endif /* __WINRT__ */
#endif /* SDL_PLATFORM_WINRT */
#ifndef __WINRT__
#ifndef SDL_PLATFORM_WINRT
{
/* There seems to be a bug in Windows where a dependency of WGI can be unloaded from memory prior to WGI itself.
* This results in Windows_Gaming_Input!GameController::~GameController() invoking an unloaded DLL and crashing.