]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_video.c
oops, video texture unlinking was accidentally removed, restore it
[xonotic/darkplaces.git] / cl_video.c
index cb1aee8f14a9f760eb4856c56c54116dc9eb5d17..524ad0ee989d31d9778218345fd0e7e127851152 100644 (file)
@@ -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 );
 }