summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2011-01-28 20:17:22 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2011-04-27 14:23:09 +0100
commit71550a8665d861384332d81239ca0c1586a17137 (patch)
tree51e31d90fb6040209600e3bfced424a5fdf37378
parent38a1f5c613a48ef9fd6ba043bc3028f487750d3a (diff)
Cygwin/X: Decorate function pointers retrieved via GetProcAddress with WINAPI
Decorate function pointers retrieved via GetProcAddress which are currently missing it with WINAPI, to ensure stdcall convention is used when calling them. This fixes a crash currently seen when compiled -O2 and the -screen option uses a size and monitor number e.g. -screen 0 1280x1000@2 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net>
-rw-r--r--hw/xwin/InitOutput.c2
-rw-r--r--hw/xwin/winmonitors.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 7faed0170..22ef8da76 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -49,7 +49,7 @@ from The Open Group.
#endif
#ifdef RELOCATE_PROJECTROOT
#include <shlobj.h>
-typedef HRESULT (*SHGETFOLDERPATHPROC)(
+typedef WINAPI HRESULT (*SHGETFOLDERPATHPROC)(
HWND hwndOwner,
int nFolder,
HANDLE hToken,
diff --git a/hw/xwin/winmonitors.c b/hw/xwin/winmonitors.c
index 63af803d0..a9d46f90e 100644
--- a/hw/xwin/winmonitors.c
+++ b/hw/xwin/winmonitors.c
@@ -53,7 +53,7 @@ wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _d
return TRUE;
}
-typedef wBOOL (*ENUMDISPLAYMONITORSPROC)(HDC,LPCRECT,MONITORENUMPROC,LPARAM);
+typedef WINAPI wBOOL (*ENUMDISPLAYMONITORSPROC)(HDC,LPCRECT,MONITORENUMPROC,LPARAM);
ENUMDISPLAYMONITORSPROC _EnumDisplayMonitors;
wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data);