From: havoc Date: Wed, 7 May 2014 22:02:04 +0000 (+0000) Subject: fix compile error caused by mixing of SDL2 and SDL1 code X-Git-Tag: xonotic-v0.8.0~70 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5c23e8315efe8d3e46c0ee2a171a4edee6249f97;p=xonotic%2Fdarkplaces.git 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 --- 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);