From: divverent Date: Wed, 7 May 2014 09:42:41 +0000 (+0000) Subject: Turn off alpha blending on vid_softsurface. X-Git-Tag: xonotic-v0.8.0~71 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=45272a3c788d6aa8f747e8e80495d88a874382a7;p=xonotic%2Fdarkplaces.git Turn off alpha blending on vid_softsurface. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12066 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=2daacad69e21dfef8d014fc67482185e2ea8af4e --- diff --git a/vid_sdl.c b/vid_sdl.c index b090c2bc..eaf067fa 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -1149,8 +1149,9 @@ void Sys_SendKeyEvents( void ) { SDL_FreeSurface(vid_softsurface); vid_softsurface = SDL_CreateRGBSurface(SDL_SWSURFACE, vid.width, vid.height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); - vid.softpixels = (unsigned int *)vid_softsurface->pixels; SDL_SetAlpha(vid_softsurface, 0, 255); + SDL_SetSurfaceBlendMode(vid_softsurface, SDL_BLENDMODE_NONE); + vid.softpixels = (unsigned int *)vid_softsurface->pixels; if (vid.softdepthpixels) free(vid.softdepthpixels); vid.softdepthpixels = (unsigned int*)calloc(1, vid.width * vid.height * 4); @@ -1299,6 +1300,7 @@ void Sys_SendKeyEvents( void ) { SDL_FreeSurface(vid_softsurface); vid_softsurface = SDL_CreateRGBSurface(SDL_SWSURFACE, vid.width, vid.height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); + SDL_SetSurfaceBlendMode(vid_softsurface, SDL_BLENDMODE_NONE); vid.softpixels = (unsigned int *)vid_softsurface->pixels; if (vid.softdepthpixels) free(vid.softdepthpixels); @@ -2712,6 +2714,7 @@ static qboolean VID_InitModeSoft(viddef_mode_t *mode) #if SDL_MAJOR_VERSION == 1 SDL_SetAlpha(vid_softsurface, 0, 255); #endif + SDL_SetSurfaceBlendMode(vid_softsurface, SDL_BLENDMODE_NONE); vid.softpixels = (unsigned int *)vid_softsurface->pixels; vid.softdepthpixels = (unsigned int *)calloc(1, mode->width * mode->height * 4);