[Mplayer-cvslog] CVS: main/libvo vo_fbdev.c,1.26,1.27
Szabolcs Berecz
szabii at users.sourceforge.net
Tue Apr 17 00:27:34 CEST 2001
Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv18443
Modified Files:
vo_fbdev.c
Log Message:
cmap bug fixed (I think)
Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** vo_fbdev.c 2001/04/16 21:53:29 1.26
--- vo_fbdev.c 2001/04/16 22:27:32 1.27
***************
*** 542,546 ****
static struct fb_var_screeninfo fb_orig_vinfo;
static struct fb_var_screeninfo fb_vinfo;
! static struct fb_cmap *fb_oldcmap = NULL;
static int fb_pixel_size; // 32: 4 24: 3 16: 2 15: 2
static int fb_real_bpp; // 32: 24 24: 24 16: 16 15: 15
--- 542,547 ----
static struct fb_var_screeninfo fb_orig_vinfo;
static struct fb_var_screeninfo fb_vinfo;
! static struct fb_cmap fb_oldcmap;
! static int fb_cmap_changed = 0;
static int fb_pixel_size; // 32: 4 24: 3 16: 2 15: 2
static int fb_real_bpp; // 32: 24 24: 24 16: 16 15: 15
***************
*** 856,860 ****
if (verbose > 0)
printf(FBDEV "creating cmap for directcolor\n");
! if (ioctl(fb_dev_fd, FBIOGETCMAP, fb_oldcmap)) {
printf(FBDEV "can't get cmap: %s\n",
strerror(errno));
--- 857,861 ----
if (verbose > 0)
printf(FBDEV "creating cmap for directcolor\n");
! if (ioctl(fb_dev_fd, FBIOGETCMAP, &fb_oldcmap)) {
printf(FBDEV "can't get cmap: %s\n",
strerror(errno));
***************
*** 868,871 ****
--- 869,873 ----
return 1;
}
+ fb_cmap_changed = 1;
free(cmap->red);
free(cmap->green);
***************
*** 1106,1113 ****
if (verbose > 0)
printf(FBDEV "uninit\n");
! if (fb_oldcmap) {
! if (ioctl(fb_dev_fd, FBIOPUTCMAP, fb_oldcmap))
printf(FBDEV "Can't restore original cmap\n");
! fb_oldcmap = NULL;
}
if (ioctl(fb_dev_fd, FBIOPUT_VSCREENINFO, &fb_orig_vinfo))
--- 1108,1115 ----
if (verbose > 0)
printf(FBDEV "uninit\n");
! if (fb_cmap_changed) {
! if (ioctl(fb_dev_fd, FBIOPUTCMAP, &fb_oldcmap))
printf(FBDEV "Can't restore original cmap\n");
! fb_cmap_changed = 0;
}
if (ioctl(fb_dev_fd, FBIOPUT_VSCREENINFO, &fb_orig_vinfo))
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list