}
static void VideoUpdateCallback(rtexture_t *rt, void *data) {
- clvideo_t *video = data;
+ clvideo_t *video = (clvideo_t *) data;
R_UpdateTexture( video->cpif.tex, (unsigned char *)video->imagedata, 0, 0, video->cpif.width, video->cpif.height );
}
static void LinkVideoTexture( clvideo_t *video ) {
video->cpif.tex = R_LoadTexture2D( cl_videotexturepool, video->cpif.name,
- video->cpif.width, video->cpif.height, NULL, TEXTYPE_BGRA, TEXF_ALWAYSPRECACHE, NULL );
+ video->cpif.width, video->cpif.height, NULL, TEXTYPE_BGRA, TEXF_ALWAYSPRECACHE | TEXF_PERSISTENT, NULL );
R_MakeTextureDynamic( video->cpif.tex, VideoUpdateCallback, video );
CL_LinkDynTexture( video->cpif.name, video->cpif.tex );
}
return;
}
- sprintf(name, "video/%s.dpv", Cmd_Argv(1));
+ dpsnprintf(name, sizeof(name), "video/%s.dpv", Cmd_Argv(1));
CL_VideoStart(name);
}