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-02-07 15:54:42 +0000
commit00ebd23b5110ea0594521c8c7b5112144a33c61d (patch)
tree90e5c95e63419563d1513840fa97068584a9440c
parent078e8368102dee7f5120b4a47c5db620712dcaca (diff)
Cygwin/X: Decorate function pointers retrieved via GetProcAddress with WINAPIxserver-cygwin-1.9.4-1cygwin-release-1.9
Decorate function pointers retrieved via GetProcAddress 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>
-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 d2d436077..70ea09d41 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);