From 491abe3a2c9c7aba6852cd028beefd10f06e5878 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 19 Feb 2009 23:12:48 +0000 Subject: [PATCH] - Fixed: DirectInput8Create() used the wrong calling convention. SVN r1426 (trunk) --- docs/rh-log.txt | 3 ++- src/win32/i_input.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f908e82a3..02e19c896 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,4 @@ -February 15, 2009 (Changes by Graf Zahl) +February 15, 2009 (Changes by Graf Zahl) - Fixed: The CHARFORMAT structure that is used to set the color in a Windows Rich Edit control was not fully initialized resulting in incorrect colors being set. @@ -23,6 +23,7 @@ February 14, 2009 (Changes by Graf Zahl) block in the file. February 10, 2009 +- Fixed: DirectInput8Create() used the wrong calling convention. - Moved the V_InitFontColors() call earlier in the startup sequence so that colored error messages appear colored in the startup window. Also lightened up the "Flat" red to contrast better on the startup background. diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index 446c40d11..d5d79ffc7 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -1455,7 +1455,7 @@ bool I_InitInput (void *hwnd) DInputDLL = LoadLibrary("dinput8.dll"); if (DInputDLL != NULL) { - typedef HRESULT (*blah)(HINSTANCE, DWORD, REFIID, LPVOID *, LPUNKNOWN); + typedef HRESULT (WINAPI *blah)(HINSTANCE, DWORD, REFIID, LPVOID *, LPUNKNOWN); blah di8c = (blah)GetProcAddress(DInputDLL, "DirectInput8Create"); if (di8c != NULL) { @@ -1484,7 +1484,7 @@ bool I_InitInput (void *hwnd) I_FatalError ("Could not load dinput.dll: %08lx", GetLastError()); } - typedef HRESULT (*blah)(HINSTANCE, DWORD, LPDIRECTINPUT*, LPUNKNOWN); + typedef HRESULT (WINAPI *blah)(HINSTANCE, DWORD, LPDIRECTINPUT*, LPUNKNOWN); blah dic = (blah)GetProcAddress (DInputDLL, "DirectInputCreateA"); if (dic == NULL)