aboutsummaryrefslogtreecommitdiff
path: root/vgasrc/stdvgamodes.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-03-15 10:58:57 -0400
committerKevin O'Connor <kevin@koconnor.net>2024-03-15 10:58:57 -0400
commitd73e18bb70f8bf0c6fd405900dd267948dd6c3b2 (patch)
tree596c69890722b89cd88201653c4a1a1ddbd6e965 /vgasrc/stdvgamodes.c
parent192e23b78418abc23a92a7174ae2294fabe4b8a3 (diff)
downloadseabios-d73e18bb70f8bf0c6fd405900dd267948dd6c3b2.zip
seabios-d73e18bb70f8bf0c6fd405900dd267948dd6c3b2.tar.gz
seabios-d73e18bb70f8bf0c6fd405900dd267948dd6c3b2.tar.bz2
vgasrc: Use curmode_g instead of vmode_g when mode is the current video mode
Many functions are passed a pointer to the current video mode vgamode_s struct. Use the name 'curmode_g' for these functions and use 'vmode_g' for functions that can accept an arbitrary video mode. Hopefully this will make the goals of the functions more clear. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/stdvgamodes.c')
-rw-r--r--vgasrc/stdvgamodes.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/vgasrc/stdvgamodes.c b/vgasrc/stdvgamodes.c
index 173dd4f..3e6b575 100644
--- a/vgasrc/stdvgamodes.c
+++ b/vgasrc/stdvgamodes.c
@@ -431,19 +431,17 @@ stdvga_override_crtc(int mode, u8 *crtc)
}
static void
-clear_screen(struct vgamode_s *vmode_g)
+clear_screen(struct vgamode_s *curmode_g)
{
- switch (GET_GLOBAL(vmode_g->memmodel)) {
+ switch (GET_GLOBAL(curmode_g->memmodel)) {
case MM_TEXT:
- memset16_far(GET_GLOBAL(vmode_g->sstart), 0, 0x0720, 32*1024);
+ memset16_far(GET_GLOBAL(curmode_g->sstart), 0, 0x0720, 32*1024);
break;
case MM_CGA:
- memset16_far(GET_GLOBAL(vmode_g->sstart), 0, 0x0000, 32*1024);
+ memset16_far(GET_GLOBAL(curmode_g->sstart), 0, 0x0000, 32*1024);
break;
default:
- // XXX - old code gets/sets/restores sequ register 2 to 0xf -
- // but it should always be 0xf anyway.
- memset16_far(GET_GLOBAL(vmode_g->sstart), 0, 0x0000, 64*1024);
+ memset16_far(GET_GLOBAL(curmode_g->sstart), 0, 0x0000, 64*1024);
}
}