aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2015-03-17 10:52:16 -0400
committerKevin O'Connor <kevin@koconnor.net>2015-03-17 10:52:16 -0400
commit184496863a40ac1eff5612ba0da11399535bfa40 (patch)
tree2fa32c5145c6ba10ab7bff27486d89d2ed0de2b9 /vgasrc
parent8f3b3ab9741a917de4d33ee5b0b0cd921559a8bf (diff)
downloadseabios-184496863a40ac1eff5612ba0da11399535bfa40.tar.gz
seabios-184496863a40ac1eff5612ba0da11399535bfa40.tar.xz
seabios-184496863a40ac1eff5612ba0da11399535bfa40.zip
vgabios: On bda_save_restore() the saved vbe_mode also has flags in it
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>
Diffstat (limited to 'vgasrc')
-rw-r--r--vgasrc/vgabios.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index f5abda6..4aa50e1 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -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));