diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-06 11:34:06 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-06 11:34:06 +0000 |
commit | bb149bb929099e4722a5809f6013af3929f7b929 (patch) | |
tree | e8f91521d0fabd147f58deef5746b7f60526fb7a /libvo | |
parent | c73a6a15d3b7f36f959272cdf4a67b575deb9f7a (diff) |
Simplify config by using code available in video_out.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22477 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_directx.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c index 383b941a1e..9794a4ccfc 100644 --- a/libvo/vo_directx.c +++ b/libvo/vo_directx.c @@ -1271,8 +1271,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t options, char *title, uint32_t format) { RECT rd; - vo_screenwidth = monitor_rect.right - monitor_rect.left; - vo_screenheight = monitor_rect.bottom - monitor_rect.top; vo_fs = options & 0x01; image_format = format; image_width = width; @@ -1280,22 +1278,10 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin d_image_width = d_width; d_image_height = d_height; if(format != primary_image_format)nooverlay = 0; - aspect_save_orig(image_width,image_height); - aspect_save_prescale(d_image_width,d_image_height); - if(vidmode){ - vo_screenwidth=vm_width; - vo_screenheight=vm_height; - } - aspect_save_screenres(vo_screenwidth,vo_screenheight); - aspect(&d_image_width, &d_image_height, A_NOZOOM); window_aspect= (float)d_image_width / (float)d_image_height; - vo_dx = 0; - vo_dy = 0; #ifdef HAVE_NEW_GUI if(use_gui){ - vo_dwidth = d_image_width; - vo_dheight = d_image_height; guiGetEvent(guiSetShVideo, 0); } #endif @@ -1314,11 +1300,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin mp_msg(MSGT_VO, MSGL_DBG3,"<vo_directx><INFO>overlay surfaces released\n"); if(!vidmode){ - if(vo_geometry){ - vo_dx= ( vo_screenwidth - d_image_width ) / 2; vo_dy=( vo_screenheight - d_image_height ) / 2; - geometry(&vo_dx, &vo_dy, &d_image_width, &d_image_height, vo_screenwidth, vo_screenheight); - } - else { + if(!vo_geometry){ GetWindowRect(hWnd,&rd); vo_dx=rd.left; vo_dy=rd.top; @@ -1584,6 +1566,16 @@ static int control(uint32_t request, void *data, ...) va_end(ap); return color_ctrl_get(data, value); } + case VOCTRL_UPDATE_SCREENINFO: + if (vidmode) { + vo_screenwidth = vm_width; + vo_screenheight = vm_height; + } else { + vo_screenwidth = monitor_rect.right - monitor_rect.left; + vo_screenheight = monitor_rect.bottom - monitor_rect.top; + } + aspect_save_screenres(vo_screenwidth, vo_screenheight); + return VO_TRUE; case VOCTRL_RESET: last_rect.left = 0xDEADC0DE; // reset window position cache // fall-through intended |