changeset 26172:6f6534bf7fbe

Handle vga_init() error and output error message.
author iive
date Sun, 09 Mar 2008 10:34:04 +0000
parents 0ea73bcbe34c
children 5b02db26105d
files libvo/vo_svga.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_svga.c	Sat Mar 08 18:55:08 2008 +0000
+++ b/libvo/vo_svga.c	Sun Mar 09 10:34:04 2008 +0000
@@ -117,7 +117,7 @@
 
 static int preinit(const char *arg)
 {
-int i;
+int i,rez;
 char s[64];
 
   getch2_disable();
@@ -181,8 +181,11 @@
     }
   }
   
-  vga_init();
-  return 0;
+  rez = vga_init();
+  if(rez != 0){
+      mp_msg(MSGT_VO,MSGL_ERR, "vo_svga: vga_init() returned error=%d\n",rez);
+  }
+  return !!rez;
 }
 
 static void svga_clear_box(int x,int y,int w,int h){