]> xenbits.xensource.com Git - seabios.git/commitdiff
vgabios: On bda_save_restore() the saved vbe_mode also has flags in it 1.8-stable upstream/1.8-stable rel-1.8.2
authorKevin O'Connor <kevin@koconnor.net>
Tue, 17 Mar 2015 14:52:16 +0000 (10:52 -0400)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 16 Jun 2015 08:00:30 +0000 (10:00 +0200)
When restoring a saved state, make sure to remove any flags from the
video mode prior to searching for that mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgasrc/vgabios.c

index f5abda6ac4c2d236d7f7c3ae82b53088d7a25120..4aa50e1c19bd2bf561f3d5c4dc364cb6b6b82a67 100644 (file)
@@ -259,7 +259,7 @@ bda_save_restore(int cmd, u16 seg, void *data)
                    , sizeof(info->bda_0x84));
         u16 vbe_mode = GET_FARVAR(seg, info->vbe_mode);
         SET_BDA_EXT(vbe_mode, vbe_mode);
-        struct vgamode_s *vmode_g = vgahw_find_mode(vbe_mode);
+        struct vgamode_s *vmode_g = vgahw_find_mode(vbe_mode & ~MF_VBEFLAGS);
         SET_BDA_EXT(vgamode_offset, (u32)vmode_g);
         SET_IVT(0x1f, GET_FARVAR(seg, info->font0));
         SET_IVT(0x43, GET_FARVAR(seg, info->font1));