From 45272a3c788d6aa8f747e8e80495d88a874382a7 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 7 May 2014 09:42:41 +0000 Subject: [PATCH] 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 --- vid_sdl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.39.2