summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-18 11:03:34 +0000
committerattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-18 11:03:34 +0000
commit15121545ddaa0391793602b61d6ca9db738b51f9 (patch)
tree08b242927fcbaf40b8fb03dab0fd4de58a7df733 /libvo
parent4efc6b83722b1eb6b613d2a98a8582c467a8917a (diff)
downloadmpv-15121545ddaa0391793602b61d6ca9db738b51f9.tar.bz2
mpv-15121545ddaa0391793602b61d6ca9db738b51f9.tar.xz
allow horizontal resolutions >1024 in case we have a G550
(actualy in case mga_vid doesn't deny it) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22711 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/mga_common.c35
1 files changed, 29 insertions, 6 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index 3114b12739..b9e8e0e8f1 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -372,12 +372,6 @@ static int mga_init(int width,int height,unsigned int format){
return (-1);
}
- if(width>1023 || height >1023)
- {
- mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
- return (-1);
- }
-
mga_vid_config.src_width = width;
mga_vid_config.src_height= height;
if(!mga_vid_config.dest_width)
@@ -389,12 +383,41 @@ static int mga_init(int width,int height,unsigned int format){
mga_vid_config.num_frames=(vo_directrendering && !vo_doublebuffering)?1:3;
mga_vid_config.version=MGA_VID_VERSION;
+
+ if(width > 1024 && height > 1024)
+ {
+ mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
+ return (-1);
+ } else if(height <= 1024)
+ {
+ // try whether we have a G550
+ int ret;
+ if(ret = ioctl(f,MGA_VID_CONFIG,&mga_vid_config))
+ {
+ if(mga_vid_config.card_type != MGA_G550)
+ {
+ // we don't have a G550, so our resolution is too high
+ mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh);
+ return (-1);
+ } else {
+ // there is a deeper problem
+ // we have a G550, but still couldn't configure mga_vid
+ perror("Error in mga_vid_config ioctl()");
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_IncompatibleDriverVersion);
+ return -1;
+ }
+ // if we arrived here, then we could successfully configure mga_vid
+ // at this high resolution
+ }
+ } else {
+ // configure mga_vid in case resolution is < 1024x1024 too
if (ioctl(f,MGA_VID_CONFIG,&mga_vid_config))
{
perror("Error in mga_vid_config ioctl()");
mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_IncompatibleDriverVersion);
return -1;
}
+ }
mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_MGA_UsingBuffers,mga_vid_config.num_frames);