From 8aecffa298082cc5daaf6f8ac0a44aa9d306c832 Mon Sep 17 00:00:00 2001 From: vortex Date: Fri, 29 Oct 2010 17:54:59 +0000 Subject: [PATCH] oops, video texture unlinking was accidentally removed, restore it git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10568 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_video.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cl_video.c b/cl_video.c index cb1aee8f..524ad0ee 100644 --- a/cl_video.c +++ b/cl_video.c @@ -62,6 +62,7 @@ static void UnlinkVideoTexture( clvideo_t *video ) { CL_UnlinkDynTexture( video->cpif.name ); // free the texture R_FreeTexture( video->cpif.tex ); + video->cpif.tex = NULL; // free the image data Mem_Free( video->imagedata ); } @@ -598,7 +599,12 @@ static void cl_video_start( void ) static void cl_video_shutdown( void ) { - // TODO: unlink video textures? + int i; + clvideo_t *video; + + for( video = cl_videos, i = 0 ; i < cl_num_videos ; i++, video++ ) + if( video->state != CLVIDEO_UNUSED && !video->suspended ) + SuspendVideo( video ); R_FreeTexturePool( &cl_videotexturepool ); } -- 2.39.2