From: John Tsiombikas Date: Thu, 11 Aug 2022 07:17:01 +0000 (+0300) Subject: fixed build on IRIX, and reduced the minimum acceptable RGB color bits X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=647f80e57841fe5ce7f6af633407495e5ddc422d;p=miniglut fixed build on IRIX, and reduced the minimum acceptable RGB color bits to allow 8bit visuals common on low end workstations. --- 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