aboutsummaryrefslogtreecommitdiff
path: root/vgasrc/vgabios.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-01-21 11:08:35 -0500
committerKevin O'Connor <kevin@koconnor.net>2012-01-21 11:08:35 -0500
commit4a73f933968e5cf6f2a6ce1ad87448dd6b136e48 (patch)
treeec0054f78b20d088a6dff98fa78f8214057d5181 /vgasrc/vgabios.c
parent0377602ae616e06fd2924dc3af0480cd13b545d4 (diff)
downloadseabios-hppa-4a73f933968e5cf6f2a6ce1ad87448dd6b136e48.zip
seabios-hppa-4a73f933968e5cf6f2a6ce1ad87448dd6b136e48.tar.gz
seabios-hppa-4a73f933968e5cf6f2a6ce1ad87448dd6b136e48.tar.bz2
vgabios: Extract out current mode finding into new function.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/vgabios.c')
-rw-r--r--vgasrc/vgabios.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index 5ce7c0c..62b09b4 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -151,7 +151,7 @@ set_active_page(u8 page)
return;
// Get the mode
- struct vgamode_s *vmode_g = vgahw_find_mode(GET_BDA(video_mode));
+ struct vgamode_s *vmode_g = get_current_mode();
if (!vmode_g)
return;
@@ -336,6 +336,17 @@ restore_bda_state(u16 seg, struct saveBDAstate *info)
SET_IVT(0x43, GET_FARVAR(seg, info->font1));
}
+
+/****************************************************************
+ * Mode setting
+ ****************************************************************/
+
+struct vgamode_s *
+get_current_mode(void)
+{
+ return vgahw_find_mode(GET_BDA(video_mode));
+}
+
// Setup BDA after a mode switch.
void
modeswitch_set_bda(int mode, int flags, struct vgamode_s *vmode_g)