]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_video.c
physics: fix and refactor unsticking
[xonotic/darkplaces.git] / cl_video.c
index 7ecf3f196135d63cc268c7e41f542805642a7468..ca9396fb6c11b0bb37af91a09faf17f17fbee30c 100644 (file)
@@ -214,7 +214,7 @@ static void LoadSubtitles( clvideo_t *video, const char *subtitlesfile )
 
 static clvideo_t* OpenVideo( clvideo_t *video, const char *filename, const char *name, int owner, const char *subtitlesfile )
 {
-       strlcpy(video->filename, filename, sizeof(video->filename));
+       dp_strlcpy(video->filename, filename, sizeof(video->filename));
        dpsnprintf(video->name, sizeof(video->name), CLVIDEOPREFIX "%s", name);
        video->ownertag = owner;
        if( strncmp( name, CLVIDEOPREFIX, sizeof( CLVIDEOPREFIX ) - 1 ) )
@@ -486,7 +486,7 @@ void CL_DrawVideo(void)
        st[6] = 1.0; st[7] = 1.0; 
        if (cl_video_keepaspectratio.integer)
        {
-               float a = video->getaspectratio(video->stream) / ((float)vid.width / (float)vid.height);
+               float a = video->getaspectratio(video->stream) / ((float)vid.mode.width / (float)vid.mode.height);
                if (cl_video_keepaspectratio.integer >= 2)
                {
                        // clip instead of scale
@@ -577,7 +577,7 @@ void CL_DrawVideo(void)
 
 void CL_VideoStart(char *filename, const char *subtitlesfile)
 {
-       Host_StartVideo();
+       CL_StartVideo();
 
        if( cl_videos->state != CLVIDEO_UNUSED )
                CL_CloseVideo( cl_videos );
@@ -615,7 +615,7 @@ static void CL_PlayVideo_f(cmd_state_t *cmd)
        char name[MAX_QPATH], subtitlesfile[MAX_QPATH];
        const char *extension;
 
-       Host_StartVideo();
+       CL_StartVideo();
 
        if (Sys_CheckParm("-benchmark"))
                return;