From 5c23e8315efe8d3e46c0ee2a171a4edee6249f97 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 7 May 2014 22:02:04 +0000 Subject: [PATCH] fix compile error caused by mixing of SDL2 and SDL1 code git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12067 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=c4e49501ff59dbe1b5b0621f239f39538fe6641b --- vid_sdl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vid_sdl.c b/vid_sdl.c index eaf067fa..ea1ab82f 100644 --- 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); -- 2.39.2