]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Turn off alpha blending on vid_softsurface.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 7 May 2014 09:42:41 +0000 (09:42 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 8 May 2014 11:36:45 +0000 (13:36 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12066 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=2daacad69e21dfef8d014fc67482185e2ea8af4e

vid_sdl.c

index b090c2bc17ad6e7ad3698aa1965e4a03152906a5..eaf067fa5ad64fa76267a60cd0665c48b0c9db19 100644 (file)
--- 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);