diff options
-rw-r--r-- | libvo/mga_common.c | 5 | ||||
-rw-r--r-- | libvo/vo_mga.c | 4 | ||||
-rw-r--r-- | libvo/vo_xmga.c | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c index 71d0ab6d0e..f0a8e9006f 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -211,3 +211,8 @@ static int mga_init(){ } +static int mga_uninit(){ + ioctl( f,MGA_VID_OFF,0 ); + munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames); + close(f); +} diff --git a/libvo/vo_mga.c b/libvo/vo_mga.c index 45f7e67d22..7cc5f7417f 100644 --- a/libvo/vo_mga.c +++ b/libvo/vo_mga.c @@ -109,8 +109,8 @@ get_info(void) static void uninit(void) { - ioctl( f,MGA_VID_OFF,0 ); -printf("vo: uninit!\n"); + mga_uninit(); + printf("vo: uninit!\n"); } static void draw_osd(void) diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index 790f1ce6f0..35d7f7911c 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -196,6 +196,7 @@ static uint32_t init( uint32_t width, uint32_t height, uint32_t d_width, uint32_ f = open(devname,O_RDWR); if(f == -1) { + perror("open"); printf("Couldn't open %s\n",devname); return(-1); } @@ -339,6 +340,6 @@ static void uninit(void) { saver_on(mDisplay); - ioctl( f,MGA_VID_OFF,0 ); -printf("vo: uninit!\n"); + mga_uninit(); + printf("vo: uninit!\n"); } |