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>
This commit is contained in:
parent
38a1f5c613
commit
71550a8665
@ -49,7 +49,7 @@ from The Open Group.
|
|||||||
#endif
|
#endif
|
||||||
#ifdef RELOCATE_PROJECTROOT
|
#ifdef RELOCATE_PROJECTROOT
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
typedef HRESULT (*SHGETFOLDERPATHPROC)(
|
typedef WINAPI HRESULT (*SHGETFOLDERPATHPROC)(
|
||||||
HWND hwndOwner,
|
HWND hwndOwner,
|
||||||
int nFolder,
|
int nFolder,
|
||||||
HANDLE hToken,
|
HANDLE hToken,
|
||||||
|
@ -53,7 +53,7 @@ wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _d
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef wBOOL (*ENUMDISPLAYMONITORSPROC)(HDC,LPCRECT,MONITORENUMPROC,LPARAM);
|
typedef WINAPI wBOOL (*ENUMDISPLAYMONITORSPROC)(HDC,LPCRECT,MONITORENUMPROC,LPARAM);
|
||||||
ENUMDISPLAYMONITORSPROC _EnumDisplayMonitors;
|
ENUMDISPLAYMONITORSPROC _EnumDisplayMonitors;
|
||||||
|
|
||||||
wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data);
|
wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data);
|
||||||
|
Loading…
Reference in New Issue
Block a user