From: yukihane Date: Wed, 3 Aug 2011 10:25:10 +0000 (+0900) Subject: ワイドサイズの動画を考慮した処理 X-Git-Tag: rel20110806_ver1.5.0~5^2 X-Git-Url: http://git.osdn.net/view?p=coroid%2Finqubus.git;a=commitdiff_plain;h=2a603bb93b8d41aadfef50de1fb2ce5fbe4a7ae3 ワイドサイズの動画を考慮した処理 --- diff --git a/vhook/comment/com_surface.c b/vhook/comment/com_surface.c index 0590620..4a9a582 100644 --- a/vhook/comment/com_surface.c +++ b/vhook/comment/com_surface.c @@ -73,11 +73,12 @@ SDL_Surface* makeCommentSurface(COMMDATA* data,const CHAT_ITEM* item,int video_w double zoomx = 1.0f; //double zoomy = 1.0f; //縮小 - - if(data->common->fontsize_fix){ - zoomx = (0.5f * (double)video_width) / (double)NICO_WIDTH; - //zoomy = (0.5f * (double)video_height) / (double)NICO_HEIGHT; - } + + if (data->common->fontsize_fix) { + const double width = (data->common->aspect_mode != 1) ? NICO_WIDTH : NICO_HD_WIDTH; + zoomx = (0.5f * (double) video_width) / width; + //zoomy = (0.5f * (double)video_height) / (double)NICO_HEIGHT; + } /*スケールの調整*/ //if(((double)ret->h * zoomy) > ((double)video_height/3.0f)){ diff --git a/vhook/nicodef.h b/vhook/nicodef.h index 9e4f964..513fd95 100644 --- a/vhook/nicodef.h +++ b/vhook/nicodef.h @@ -5,6 +5,9 @@ //定義 #define NICO_WIDTH 512 #define NICO_HEIGHT 384 +// 16:9 動画用定義 +#define NICO_HD_WIDTH 640 +#define NICO_HD_HEIGHT NICO_HEIGHT #define VPOS_FACTOR 100 //多分係数の意味では・・・やはり1/100で記録してるっぽい