mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 17:41:19 +00:00
- fix querying for the wrong interface when the UNICODE define is set
This commit is contained in:
parent
36b7a7d189
commit
fc38b6bbf9
1 changed files with 6 additions and 2 deletions
|
@ -674,7 +674,7 @@ bool I_InitInput (void *hwnd)
|
||||||
blah di8c = (blah)GetProcAddress(DInputDLL, "DirectInput8Create");
|
blah di8c = (blah)GetProcAddress(DInputDLL, "DirectInput8Create");
|
||||||
if (di8c != NULL)
|
if (di8c != NULL)
|
||||||
{
|
{
|
||||||
hr = di8c(g_hInst, DIRECTINPUT_VERSION, IID_IDirectInput8A, (void **)&g_pdi, NULL);
|
hr = di8c(g_hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (void **)&g_pdi, NULL);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
Printf(TEXTCOLOR_ORANGE "DirectInput8Create failed: %08lx\n", hr);
|
Printf(TEXTCOLOR_ORANGE "DirectInput8Create failed: %08lx\n", hr);
|
||||||
|
@ -700,7 +700,11 @@ bool I_InitInput (void *hwnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef HRESULT (WINAPI *blah)(HINSTANCE, DWORD, LPDIRECTINPUT*, LPUNKNOWN);
|
typedef HRESULT (WINAPI *blah)(HINSTANCE, DWORD, LPDIRECTINPUT*, LPUNKNOWN);
|
||||||
blah dic = (blah)GetProcAddress (DInputDLL, "DirectInputCreateA");
|
#ifdef UNICODE
|
||||||
|
blah dic = (blah)GetProcAddress (DInputDLL, "DirectInputCreateW");
|
||||||
|
#else
|
||||||
|
blah dic = (blah)GetProcAddress(DInputDLL, "DirectInputCreateA");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (dic == NULL)
|
if (dic == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue