]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix compile error caused by mixing of SDL2 and SDL1 code
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 7 May 2014 22:02:04 +0000 (22:02 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 8 May 2014 11:36:46 +0000 (13:36 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12067 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c4e49501ff59dbe1b5b0621f239f39538fe6641b

vid_sdl.c

index eaf067fa5ad64fa76267a60cd0665c48b0c9db19..ea1ab82f0a0f4949cf3521463a621fa988eb6a09 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -1150,7 +1150,6 @@ void Sys_SendKeyEvents( void )
                                                SDL_FreeSurface(vid_softsurface);
                                                vid_softsurface = SDL_CreateRGBSurface(SDL_SWSURFACE, vid.width, vid.height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
                                                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);
@@ -2713,8 +2712,9 @@ static qboolean VID_InitModeSoft(viddef_mode_t *mode)
        }
 #if SDL_MAJOR_VERSION == 1
        SDL_SetAlpha(vid_softsurface, 0, 255);
-#endif
+#else
        SDL_SetSurfaceBlendMode(vid_softsurface, SDL_BLENDMODE_NONE);
+#endif
 
        vid.softpixels = (unsigned int *)vid_softsurface->pixels;
        vid.softdepthpixels = (unsigned int *)calloc(1, mode->width * mode->height * 4);