]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_sdl.c
added vid_sRGB cvar, this replaces the r_texture_sRGB* cvars and
[xonotic/darkplaces.git] / vid_sdl.c
index 76cc2ac44a38d2b745e578edaec742e5046b13ea..c301160af09adffd8a3fbd0c507ebd00f7389a33 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -1745,6 +1745,8 @@ void GLES_Init(void)
        Con_DPrintf("Using GLES2.0 rendering path - %i texture matrix, %i texture images, %i texcoords%s\n", vid.texunits, vid.teximageunits, vid.texarrayunits, vid.support.ext_framebuffer_object ? ", shadowmapping supported" : "");
        vid.renderpath = RENDERPATH_GLES2;
        vid.useinterleavedarrays = false;
+       vid.sRGBcapable2D = false;
+       vid.sRGBcapable3D = false;
 
        // VorteX: set other info (maybe place them in VID_InitMode?)
        extern cvar_t gl_info_vendor;
@@ -1850,6 +1852,15 @@ static SDL_Surface *VID_WrapSDL_SetVideoMode(int screenwidth, int screenheight,
        }
        return screen;
 }
+#elif defined(MACOSX)
+static SDL_Surface *VID_WrapSDL_SetVideoMode(int screenwidth, int screenheight, int screenbpp, int screenflags)
+{
+       SDL_Surface *screen = NULL;
+       SDL_WM_SetCaption( gamename, NULL );
+       screen = SDL_SetVideoMode(screenwidth, screenheight, screenbpp, screenflags);
+       // we don't use SDL_WM_SetIcon here because the icon in the .app should be used
+       return screen;
+}
 #else
 // Adding the OS independent XPM version --blub
 #include "darkplaces.xpm"
@@ -2424,10 +2435,12 @@ void VID_Shutdown (void)
 
 #if SETVIDEOMODE
 #ifndef WIN32
+#ifndef MACOSX
        if (icon)
                SDL_FreeSurface(icon);
        icon = NULL;
 #endif
+#endif
 #endif
 
        if (vid_softsurface)