From 647f80e57841fe5ce7f6af633407495e5ddc422d Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Thu, 11 Aug 2022 10:17:01 +0300 Subject: [PATCH] fixed build on IRIX, and reduced the minimum acceptable RGB color bits to allow 8bit visuals common on low end workstations. --- miniglut.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/miniglut.c b/miniglut.c index 2d8f393..eea3d20 100644 --- a/miniglut.c +++ b/miniglut.c @@ -15,7 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#if defined(__unix__) +#if defined(unix) || defined(__unix__) #include #include @@ -846,9 +846,9 @@ static XVisualInfo *choose_visual(unsigned int mode) *aptr++ = 1; } else { *aptr++ = GLX_RGBA; - *aptr++ = GLX_RED_SIZE; *aptr++ = 4; - *aptr++ = GLX_GREEN_SIZE; *aptr++ = 4; - *aptr++ = GLX_BLUE_SIZE; *aptr++ = 4; + *aptr++ = GLX_RED_SIZE; *aptr++ = 1; + *aptr++ = GLX_GREEN_SIZE; *aptr++ = 1; + *aptr++ = GLX_BLUE_SIZE; *aptr++ = 1; } if(mode & GLUT_ALPHA) { *aptr++ = GLX_ALPHA_SIZE; @@ -1725,7 +1725,7 @@ static void get_screen_size(int *scrw, int *scrh) } #endif /* BUILD_WIN32 */ -#if defined(__unix__) || defined(__APPLE__) +#if defined(unix) || defined(__unix__) || defined(__APPLE__) #include #ifdef MINIGLUT_USE_LIBC -- 1.7.10.4