From: havoc Date: Mon, 24 Jan 2011 05:48:21 +0000 (+0000) Subject: fix some compile errors on vid_sdl.c when compiling it as C++ X-Git-Tag: xonotic-v0.5.0~438^2~106 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=72b47541ebd228c943320b98f4dd37f71370b4b9;p=xonotic%2Fdarkplaces.git fix some compile errors on vid_sdl.c when compiling it as C++ git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10735 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_sdl.c b/vid_sdl.c index a9dd5c45..5c9ee27e 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -613,11 +613,11 @@ 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 = vid_softsurface->pixels; + vid.softpixels = (unsigned int *)vid_softsurface->pixels; SDL_SetAlpha(vid_softsurface, 0, 255); if (vid.softdepthpixels) free(vid.softdepthpixels); - vid.softdepthpixels = calloc(1, vid.width * vid.height * 4); + vid.softdepthpixels = (unsigned int*)calloc(1, vid.width * vid.height * 4); } #ifdef SDL_R_RESTART // better not call R_Modules_Restart from here directly, as this may wreak havoc... @@ -1162,9 +1162,9 @@ qboolean VID_InitModeSoft(viddef_mode_t *mode) } SDL_SetAlpha(vid_softsurface, 0, 255); - vid.softpixels = vid_softsurface->pixels; - vid.softdepthpixels = calloc(1, mode->width * mode->height * 4); - DPSOFTRAST_Init(mode->width, mode->height, vid_softsurface->pixels, vid.softdepthpixels); + vid.softpixels = (unsigned int *)vid_softsurface->pixels; + vid.softdepthpixels = (unsigned int *)calloc(1, mode->width * mode->height * 4); + DPSOFTRAST_Init(mode->width, mode->height, (unsigned int *)vid_softsurface->pixels, (unsigned int *)vid.softdepthpixels); // set window title VID_SetCaption();