summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorpacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-02-17 03:49:33 +0000
committerpacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-02-17 03:49:33 +0000
commit74e03a35f100b7456fcc661c69e94fab274ec448 (patch)
tree71785ca7107d991384cfcafe8c4a57c80471f52a /libvo
parent1ab575101ab9e2e250d782b4e104fcca1c1c66b0 (diff)
downloadmpv-74e03a35f100b7456fcc661c69e94fab274ec448.tar.bz2
mpv-74e03a35f100b7456fcc661c69e94fab274ec448.tar.xz
Fix colormap save/restore for directcolor fb devices
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17638 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_fbdev.c3
-rw-r--r--libvo/vo_fbdev2.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index 4c6126917d..e4ca88cf89 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -549,7 +549,8 @@ static uint8_t *center; /* thx .so :) */
static struct fb_fix_screeninfo fb_finfo;
static struct fb_var_screeninfo fb_orig_vinfo;
static struct fb_var_screeninfo fb_vinfo;
-static struct fb_cmap fb_oldcmap;
+static unsigned short fb_ored[256], fb_ogreen[256], fb_oblue[256];
+static struct fb_cmap fb_oldcmap = { 0, 256, fb_ored, fb_ogreen, fb_oblue };
static int fb_cmap_changed = 0;
static int fb_pixel_size; // 32: 4 24: 3 16: 2 15: 2
static int fb_bpp; // 32: 32 24: 24 16: 16 15: 15
diff --git a/libvo/vo_fbdev2.c b/libvo/vo_fbdev2.c
index 282233a7f6..b58e6fc805 100644
--- a/libvo/vo_fbdev2.c
+++ b/libvo/vo_fbdev2.c
@@ -72,7 +72,8 @@ static uint8_t *center = NULL; // where to begin writing our image (centered?)
static struct fb_fix_screeninfo fb_finfo; // fixed info
static struct fb_var_screeninfo fb_vinfo; // variable info
static struct fb_var_screeninfo fb_orig_vinfo; // variable info to restore later
-static struct fb_cmap fb_oldcmap; // cmap to restore later
+static unsigned short fb_ored[256], fb_ogreen[256], fb_oblue[256];
+static struct fb_cmap fb_oldcmap = { 0, 256, fb_ored, fb_ogreen, fb_oblue };
static int fb_cmap_changed = 0; // to restore map
static int fb_pixel_size; // 32: 4 24: 3 16: 2 15: 2
static int fb_bpp; // 32: 32 24: 24 16: 16 15: 15