From: vortex Date: Sat, 24 Apr 2010 16:45:22 +0000 (+0000) Subject: subtitles: fix a bug with last subtitle now showing sometimes X-Git-Tag: xonotic-v0.1.0preview~230^2~376 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=95b4da202fbc2c9963fedf4fa710c098618632d7;p=xonotic%2Fdarkplaces.git subtitles: fix a bug with last subtitle now showing sometimes git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10101 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_video.c b/cl_video.c index 1328322d..3cd9860d 100644 --- a/cl_video.c +++ b/cl_video.c @@ -151,7 +151,7 @@ static void LoadSubtitles( clvideo_t *video, const char *subtitlesfile ) if (video->subtitle_end[numsubs-1] <= 0) video->subtitle_end[numsubs-1] = 99999999; // fixme: make it end when video ends? else - video->subtitle_end[numsubs-1] = min(video->subtitle_start[numsubs-1] + video->subtitle_end[numsubs-1], video->subtitle_start[numsubs]); + video->subtitle_end[numsubs-1] = video->subtitle_start[numsubs-1] + video->subtitle_end[numsubs-1]; } Z_Free( subtitle_text ); video->subtitles = numsubs; @@ -467,7 +467,7 @@ void CL_DrawVideo(void) // found, draw it si.font = FONT_NOTIFY; si.x = vid_conwidth.integer * 0.1; - si.y = vid_conheight.integer - (max(1, cl_video_subtitles_lines.integer) * cl_video_subtitles_textsize.value); + si.y = vid_conheight.integer - (max(1, cl_video_subtitles_lines.value) * cl_video_subtitles_textsize.value); si.width = vid_conwidth.integer * 0.8; si.height = max(1, cl_video_subtitles_lines.integer) * cl_video_subtitles_textsize.value; si.alignment = 0.5;