From 2bebcfa23fa7dec501b9c53f4c82ad340789922a Mon Sep 17 00:00:00 2001 From: fayjf Date: Mon, 2 Nov 2009 13:42:23 +0000 Subject: [PATCH] Protecting some preprocessor symbols that are not defined in OpenGL-ES per e-mail from Vincent R dated 5:37 AM, October 3, 2009. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@833 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_main.c | 2 +- freeglut/freeglut/src/freeglut_state.c | 28 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/freeglut/freeglut/src/freeglut_main.c b/freeglut/freeglut/src/freeglut_main.c index 3a6de78..058f462 100644 --- a/freeglut/freeglut/src/freeglut_main.c +++ b/freeglut/freeglut/src/freeglut_main.c @@ -1735,7 +1735,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, * XXX WM_MOUSELEAVE code set it to false. Then when we get a WM_MOUSEMOVE event, * XXX if the flag is false we invoke the Entry callback and set the flag to true. */ - case 0x02a2: /* This is the message we get when the mouse is leaving the window */ + case 0x02a3: /* This is the message we get when the mouse is leaving the window */ if( window->IsMenu && window->ActiveMenu && window->ActiveMenu->IsActive ) fgUpdateMenuHighlight( window->ActiveMenu ); diff --git a/freeglut/freeglut/src/freeglut_state.c b/freeglut/freeglut/src/freeglut_state.c index 5dab8c5..8a53450 100644 --- a/freeglut/freeglut/src/freeglut_state.c +++ b/freeglut/freeglut/src/freeglut_state.c @@ -364,16 +364,28 @@ int FGAPIENTRY glutGet( GLenum eWhat ) /* Handle the OpenGL inquiries */ case GLUT_WINDOW_RGBA: +#if defined(_WIN32_WCE) + boolValue = (GLboolean)0; /* WinCE doesn't support this feature */ +#else glGetBooleanv ( GL_RGBA_MODE, &boolValue ); returnValue = boolValue ? 1 : 0; +#endif return returnValue; case GLUT_WINDOW_DOUBLEBUFFER: +#if defined(_WIN32_WCE) + boolValue = (GLboolean)0; /* WinCE doesn't support this feature */ +#else glGetBooleanv ( GL_DOUBLEBUFFER, &boolValue ); returnValue = boolValue ? 1 : 0; +#endif return returnValue; case GLUT_WINDOW_STEREO: +#if defined(_WIN32_WCE) + boolValue = (GLboolean)0; /* WinCE doesn't support this feature */ +#else glGetBooleanv ( GL_STEREO, &boolValue ); returnValue = boolValue ? 1 : 0; +#endif return returnValue; case GLUT_WINDOW_RED_SIZE: @@ -389,16 +401,32 @@ int FGAPIENTRY glutGet( GLenum eWhat ) glGetIntegerv ( GL_ALPHA_BITS, &returnValue ); return returnValue; case GLUT_WINDOW_ACCUM_RED_SIZE: +#if defined(_WIN32_WCE) + returnValue = 0; /* WinCE doesn't support this feature */ +#else glGetIntegerv ( GL_ACCUM_RED_BITS, &returnValue ); +#endif return returnValue; case GLUT_WINDOW_ACCUM_GREEN_SIZE: +#if defined(_WIN32_WCE) + returnValue = 0; /* WinCE doesn't support this feature */ +#else glGetIntegerv ( GL_ACCUM_GREEN_BITS, &returnValue ); +#endif return returnValue; case GLUT_WINDOW_ACCUM_BLUE_SIZE: +#if defined(_WIN32_WCE) + returnValue = 0; /* WinCE doesn't support this feature */ +#else glGetIntegerv ( GL_ACCUM_BLUE_BITS, &returnValue ); +#endif return returnValue; case GLUT_WINDOW_ACCUM_ALPHA_SIZE: +#if defined(_WIN32_WCE) + returnValue = 0; /* WinCE doesn't support this feature */ +#else glGetIntegerv ( GL_ACCUM_ALPHA_BITS, &returnValue ); +#endif return returnValue; case GLUT_WINDOW_DEPTH_SIZE: glGetIntegerv ( GL_DEPTH_BITS, &returnValue );