Bladeren bron

SDL_windows_gaming_input.c: work-around to build against old SDKs.

Fixes https://github.com/libsdl-org/SDL/issues/15646
Ozkan Sezer 15 uur geleden
bovenliggende
commit
42c4a0e30f
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      src/joystick/windows/SDL_windows_gaming_input.c

+ 2 - 2
src/joystick/windows/SDL_windows_gaming_input.c

@@ -62,7 +62,7 @@ typedef struct WindowsGamingInputControllerState
     int steam_virtual_gamepad_slot;
     int steam_virtual_gamepad_slot;
 } WindowsGamingInputControllerState;
 } WindowsGamingInputControllerState;
 
 
-typedef HRESULT(WINAPI *CoIncrementMTAUsage_t)(CO_MTA_USAGE_COOKIE *pCookie);
+typedef HRESULT(WINAPI *CoIncrementMTAUsage_t)(HANDLE* pCookie); // CO_MTA_USAGE_COOKIE*
 typedef HRESULT(WINAPI *RoGetActivationFactory_t)(HSTRING activatableClassId, REFIID iid, void **factory);
 typedef HRESULT(WINAPI *RoGetActivationFactory_t)(HSTRING activatableClassId, REFIID iid, void **factory);
 typedef HRESULT(WINAPI *WindowsCreateStringReference_t)(PCWSTR sourceString, UINT32 length, HSTRING_HEADER *hstringHeader, HSTRING *string);
 typedef HRESULT(WINAPI *WindowsCreateStringReference_t)(PCWSTR sourceString, UINT32 length, HSTRING_HEADER *hstringHeader, HSTRING *string);
 typedef HRESULT(WINAPI *WindowsDeleteString_t)(HSTRING string);
 typedef HRESULT(WINAPI *WindowsDeleteString_t)(HSTRING string);
@@ -611,7 +611,7 @@ static bool WGI_JoystickInit(void)
          * As a workaround, we will keep a reference to the MTA to prevent COM from unloading DLLs later.
          * As a workaround, we will keep a reference to the MTA to prevent COM from unloading DLLs later.
          * See https://github.com/libsdl-org/SDL/issues/5552 for more details.
          * See https://github.com/libsdl-org/SDL/issues/5552 for more details.
          */
          */
-        static CO_MTA_USAGE_COOKIE cookie = NULL;
+        static HANDLE cookie = NULL; // CO_MTA_USAGE_COOKIE*
         if (!cookie) {
         if (!cookie) {
             hr = wgi.CoIncrementMTAUsage(&cookie);
             hr = wgi.CoIncrementMTAUsage(&cookie);
             if (FAILED(hr)) {
             if (FAILED(hr)) {