r1159 - in branches/unified-sdl: . code/sdl

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Sep 5 12:37:17 EDT 2007


Author: tma
Date: 2007-09-05 12:37:17 -0400 (Wed, 05 Sep 2007)
New Revision: 1159

Modified:
   branches/unified-sdl/Makefile
   branches/unified-sdl/code/sdl/sdl_glimp.c
Log:
* Don't USE_ICON on OS X, apparently it looks shit


Modified: branches/unified-sdl/Makefile
===================================================================
--- branches/unified-sdl/Makefile	2007-09-05 16:07:30 UTC (rev 1158)
+++ branches/unified-sdl/Makefile	2007-09-05 16:37:17 UTC (rev 1159)
@@ -188,7 +188,8 @@
   endif
   endif
 
-  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe
+  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+    -pipe -DUSE_ICON $(shell sdl-config --cflags)
 
   ifeq ($(USE_OPENAL),1)
     BASE_CFLAGS += -DUSE_OPENAL=1
@@ -208,8 +209,6 @@
     BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
   endif
 
-  BASE_CFLAGS += $(shell sdl-config --cflags)
-
   OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer
 
   ifeq ($(ARCH),x86_64)
@@ -236,10 +235,6 @@
     BASE_CFLAGS += -DNO_VM_COMPILED
   endif
 
-  DEBUG_CFLAGS = $(BASE_CFLAGS) -g -O0
-
-  RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
-
   SHLIBEXT=so
   SHLIBCFLAGS=-fPIC
   SHLIBLDFLAGS=-shared $(LDFLAGS)
@@ -271,6 +266,9 @@
     LDFLAGS+=-m32
   endif
 
+  DEBUG_CFLAGS = $(BASE_CFLAGS) -g -O0
+  RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
+
 else # ifeq Linux
 
 #############################################################################
@@ -408,7 +406,8 @@
 
   ARCH=x86
 
-  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
+  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+    -DUSE_ICON -I$(SDLHDIR)/include
 
   ifeq ($(USE_OPENAL),1)
     BASE_CFLAGS += -DUSE_OPENAL=1 -DUSE_OPENAL_DLOPEN=1
@@ -431,10 +430,6 @@
 
   HAVE_VM_COMPILED = true
 
-  DEBUG_CFLAGS=$(BASE_CFLAGS) -g -O0
-
-  RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
-
   SHLIBEXT=dll
   SHLIBCFLAGS=
   SHLIBLDFLAGS=-shared $(LDFLAGS)
@@ -460,7 +455,8 @@
     LDFLAGS+=-m32
   endif
 
-  BASE_CFLAGS += -I$(SDLHDIR)/include
+  DEBUG_CFLAGS=$(BASE_CFLAGS) -g -O0
+  RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG $(OPTIMIZE)
 
   # libmingw32 must be linked before libSDLmain
   CLIENT_LDFLAGS += -lmingw32 \
@@ -486,10 +482,8 @@
 
 
   BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
-                -I/usr/X11R6/include
+    -DUSE_ICON $(shell sdl-config --cflags)
 
-  DEBUG_CFLAGS=$(BASE_CFLAGS) -g
-
   ifeq ($(USE_OPENAL),1)
     BASE_CFLAGS += -DUSE_OPENAL=1
     ifeq ($(USE_OPENAL_DLOPEN),1)
@@ -501,8 +495,6 @@
     BASE_CFLAGS += -DUSE_CODEC_VORBIS=1
   endif
 
-  BASE_CFLAGS += $(shell sdl-config --cflags)
-
   ifeq ($(ARCH),axp)
     BASE_CFLAGS += -DNO_VM_COMPILED
     RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \
@@ -519,6 +511,8 @@
   endif
   endif
 
+  DEBUG_CFLAGS=$(BASE_CFLAGS) -g
+
   SHLIBEXT=so
   SHLIBCFLAGS=-fPIC
   SHLIBLDFLAGS=-shared $(LDFLAGS)
@@ -561,12 +555,13 @@
   THREAD_LDFLAGS=-lpthread
 
   BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes
-  DEBUG_CFLAGS=$(BASE_CFLAGS) -g
 
   ifneq ($(ARCH),i386)
     BASE_CFLAGS += -DNO_VM_COMPILED
   endif
 
+  DEBUG_CFLAGS=$(BASE_CFLAGS) -g
+
   BUILD_CLIENT = 0
   BUILD_GAME_QVM = 0
 
@@ -618,10 +613,9 @@
   endif
 
 
-  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe
+  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+    -pipe -DUSE_ICON $(shell sdl-config --cflags)
 
-  BASE_CFLAGS += $(shell sdl-config --cflags)
-
   OPTIMIZE = -O3 -ffast-math -funroll-loops
 
   ifeq ($(ARCH),sparc)

Modified: branches/unified-sdl/code/sdl/sdl_glimp.c
===================================================================
--- branches/unified-sdl/code/sdl/sdl_glimp.c	2007-09-05 16:07:30 UTC (rev 1158)
+++ branches/unified-sdl/code/sdl/sdl_glimp.c	2007-09-05 16:37:17 UTC (rev 1159)
@@ -107,7 +107,6 @@
 	int tcolorbits, tdepthbits, tstencilbits;
 	int i = 0;
 	SDL_Surface *vidscreen = NULL;
-	SDL_Surface *icon = NULL;
 
 	ri.Printf( PRINT_ALL, "Initializing OpenGL display\n");
 
@@ -220,21 +219,25 @@
 		if( SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, r_swapInterval->integer ) < 0 )
 			ri.Printf( PRINT_ALL, "r_swapInterval requires libSDL >= 1.2.10\n" );
 
-		icon = SDL_CreateRGBSurfaceFrom(
-				(void *)CLIENT_WINDOW_ICON.pixel_data,
-				CLIENT_WINDOW_ICON.width,
-				CLIENT_WINDOW_ICON.height,
-				CLIENT_WINDOW_ICON.bytes_per_pixel * 8,
-				CLIENT_WINDOW_ICON.bytes_per_pixel * CLIENT_WINDOW_ICON.width,
+#ifdef USE_ICON
+		{
+			SDL_Surface *icon = SDL_CreateRGBSurfaceFrom(
+					(void *)CLIENT_WINDOW_ICON.pixel_data,
+					CLIENT_WINDOW_ICON.width,
+					CLIENT_WINDOW_ICON.height,
+					CLIENT_WINDOW_ICON.bytes_per_pixel * 8,
+					CLIENT_WINDOW_ICON.bytes_per_pixel * CLIENT_WINDOW_ICON.width,
 #ifdef Q3_LITTLE_ENDIAN
-				0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF
+					0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF
 #else
-				0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000
+					0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000
 #endif
-				);
+					);
 
-		SDL_WM_SetIcon( icon, NULL );
-		SDL_FreeSurface( icon );
+			SDL_WM_SetIcon( icon, NULL );
+			SDL_FreeSurface( icon );
+		}
+#endif
 
 		SDL_WM_SetCaption(CLIENT_WINDOW_TITLE, CLIENT_WINDOW_MIN_TITLE);
 		SDL_ShowCursor(0);




More information about the quake3-commits mailing list