Fix support for Windows XP and up (#13904)

This commit is contained in:
nightmareci
2025-09-08 13:00:26 -07:00
committed by GitHub
parent 3f196c0abe
commit 2f5bc17ea6
32 changed files with 1096 additions and 561 deletions

View File

@@ -38,15 +38,15 @@ bool SDL_InitGameInput(IGameInput **ppGameInput)
return false;
}
typedef HRESULT (WINAPI *GameInputCreate_t)(IGameInput **gameInput);
GameInputCreate_t GameInputCreateFunc = (GameInputCreate_t)SDL_LoadFunction(g_hGameInputDLL, "GameInputCreate");
if (!GameInputCreateFunc) {
typedef HRESULT (WINAPI *pfnGameInputCreate)(IGameInput **gameInput);
pfnGameInputCreate pGameInputCreate = (pfnGameInputCreate)SDL_LoadFunction(g_hGameInputDLL, "GameInputCreate");
if (!pGameInputCreate) {
SDL_UnloadObject(g_hGameInputDLL);
return false;
}
IGameInput *pGameInput = NULL;
HRESULT hr = GameInputCreateFunc(&pGameInput);
HRESULT hr = pGameInputCreate(&pGameInput);
if (FAILED(hr)) {
SDL_UnloadObject(g_hGameInputDLL);
return WIN_SetErrorFromHRESULT("GameInputCreate failed", hr);