From 142e76b21681a6aeacb8e05dd110c0d0c69fee00 Mon Sep 17 00:00:00 2001 From: fayjf Date: Mon, 1 Feb 2010 03:02:44 +0000 Subject: [PATCH] Allowing recent change to build on older versions of MSVC per e-mail from Eero Pajarre dated 1/31/10 at 10:00 AM git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@875 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_window.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/freeglut/freeglut/src/freeglut_window.c b/freeglut/freeglut/src/freeglut_window.c index 6244c61..d7f969b 100644 --- a/freeglut/freeglut/src/freeglut_window.c +++ b/freeglut/freeglut/src/freeglut_window.c @@ -827,6 +827,7 @@ void fgSetWindow ( SFG_Window *window ) #if TARGET_HOST_MS_WINDOWS +#if(WINVER >= 0x500) typedef struct { int *x; int *y; @@ -859,7 +860,7 @@ static BOOL CALLBACK m_proc(HMONITOR mon, * this function is only used in fgOpenWindow. Currently it only sets * its output parameters, if the DisplayName is set in fgDisplay * (and if it is able to recognize the display) -*/ + */ static void get_display_origin(int *xp,int *yp) { @@ -872,6 +873,17 @@ static void get_display_origin(int *xp,int *yp) EnumDisplayMonitors(0,0,m_proc,(LPARAM)&st); } } +#else +#pragma message( "-display parameter only works if compiled with WINVER >= 0x0500") + +static void get_display_origin(int *xp,int *yp) +{ + if( fgDisplay.DisplayName ) + { + fgWarning( "for working -display support FreeGLUT must be compiled with WINVER >= 0x0500"); + } +} +#endif #endif