From ad603f5559ce649c6d06d746a7d361d2d0188ad4 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 16 May 2008 08:33:27 +0000 Subject: cosmetics: Remove useless parentheses from from return statements. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26787 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/mga_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libvo/mga_common.c') diff --git a/libvo/mga_common.c b/libvo/mga_common.c index b150b18012..d286f36005 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -368,7 +368,7 @@ static int mga_init(int width,int height,unsigned int format){ mga_vid_config.format=MGA_VID_FORMAT_UYVY; break; default: mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_InvalidOutputFormat,format); - return (-1); + return -1; } mga_vid_config.src_width = width; @@ -386,7 +386,7 @@ static int mga_init(int width,int height,unsigned int format){ if(width > 1024 && height > 1024) { mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh); - return (-1); + return -1; } else if(height <= 1024) { // try whether we have a G550 @@ -397,7 +397,7 @@ static int mga_init(int width,int height,unsigned int format){ { // we don't have a G550, so our resolution is too high mp_msg(MSGT_VO,MSGL_ERR, MGSTR_LIBVO_MGA_ResolutionTooHigh); - return (-1); + return -1; } else { // there is a deeper problem // we have a G550, but still couldn't configure mga_vid @@ -457,7 +457,7 @@ static int preinit(const char *vo_subdevice) { perror("open"); mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldntOpen,devname); - return(-1); + return -1; } #ifdef VO_XMGA -- cgit v1.2.3 From abd22b8f480a261536151b89d03b2730b7056c8e Mon Sep 17 00:00:00 2001 From: attila Date: Fri, 23 May 2008 20:18:06 +0000 Subject: make use of the new MGA_VID_VERSION ioctl to check whether the installed driver has the version we expect it to have. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26863 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/mga_common.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libvo/mga_common.c') diff --git a/libvo/mga_common.c b/libvo/mga_common.c index d286f36005..48b3bb91c0 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -449,6 +449,7 @@ static int mga_uninit(){ static int preinit(const char *vo_subdevice) { + uint32_t ver; const char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid"; sws_rgb2rgb_init(get_sws_cpuflags()); @@ -459,6 +460,16 @@ static int preinit(const char *vo_subdevice) mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldntOpen,devname); return -1; } + + // check whether the mga_vid driver has the same + // version as we expect + + ioctl(f,MGA_VID_GET_VERSION,&ver); + if(MGA_VID_VERSION != ver) + { + mp_msg(MSGT_VO, MSGL_ERR, MGSTR_LIBVO_MGA_mgavidVersionMissmatch, ver, MGA_VID_VERSION); + return -1; + } #ifdef VO_XMGA if (!vo_init()) { -- cgit v1.2.3 From 90c5b9d782bd2db21ef3774969e1fb246df203c3 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 27 May 2008 13:30:50 +0000 Subject: Fix typo in string name. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26900 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/mga_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libvo/mga_common.c') diff --git a/libvo/mga_common.c b/libvo/mga_common.c index 48b3bb91c0..0ffaafc9e8 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -467,7 +467,7 @@ static int preinit(const char *vo_subdevice) ioctl(f,MGA_VID_GET_VERSION,&ver); if(MGA_VID_VERSION != ver) { - mp_msg(MSGT_VO, MSGL_ERR, MGSTR_LIBVO_MGA_mgavidVersionMissmatch, ver, MGA_VID_VERSION); + mp_msg(MSGT_VO, MSGL_ERR, MGSTR_LIBVO_MGA_mgavidVersionMismatch, ver, MGA_VID_VERSION); return -1; } -- cgit v1.2.3