mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-26 09:14:25 +00:00
Fix support for Windows XP and up (#13904)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user