diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2024-03-15 10:58:57 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-03-15 10:58:57 -0400 |
commit | d73e18bb70f8bf0c6fd405900dd267948dd6c3b2 (patch) | |
tree | 596c69890722b89cd88201653c4a1a1ddbd6e965 /vgasrc/stdvga.c | |
parent | 192e23b78418abc23a92a7174ae2294fabe4b8a3 (diff) | |
download | seabios-d73e18bb70f8bf0c6fd405900dd267948dd6c3b2.tar.gz |
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/stdvga.c')
-rw-r--r-- | vgasrc/stdvga.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/vgasrc/stdvga.c b/vgasrc/stdvga.c index 0e01275c..9d8f556f 100644 --- a/vgasrc/stdvga.c +++ b/vgasrc/stdvga.c @@ -264,59 +264,59 @@ stdvga_get_vde(void) } int -stdvga_get_window(struct vgamode_s *vmode_g, int window) +stdvga_get_window(struct vgamode_s *curmode_g, int window) { return -1; } int -stdvga_set_window(struct vgamode_s *vmode_g, int window, int val) +stdvga_set_window(struct vgamode_s *curmode_g, int window, int val) { return -1; } int -stdvga_get_linelength(struct vgamode_s *vmode_g) +stdvga_get_linelength(struct vgamode_s *curmode_g) { u8 val = stdvga_crtc_read(stdvga_get_crtc(), 0x13); - return val * 8 / stdvga_vram_ratio(vmode_g); + return val * 8 / stdvga_vram_ratio(curmode_g); } int -stdvga_set_linelength(struct vgamode_s *vmode_g, int val) +stdvga_set_linelength(struct vgamode_s *curmode_g, int val) { - val = DIV_ROUND_UP(val * stdvga_vram_ratio(vmode_g), 8); + val = DIV_ROUND_UP(val * stdvga_vram_ratio(curmode_g), 8); stdvga_crtc_write(stdvga_get_crtc(), 0x13, val); return 0; } int -stdvga_get_displaystart(struct vgamode_s *vmode_g) +stdvga_get_displaystart(struct vgamode_s *curmode_g) { u16 crtc_addr = stdvga_get_crtc(); int addr = (stdvga_crtc_read(crtc_addr, 0x0c) << 8 | stdvga_crtc_read(crtc_addr, 0x0d)); - return addr * 4 / stdvga_vram_ratio(vmode_g); + return addr * 4 / stdvga_vram_ratio(curmode_g); } int -stdvga_set_displaystart(struct vgamode_s *vmode_g, int val) +stdvga_set_displaystart(struct vgamode_s *curmode_g, int val) { u16 crtc_addr = stdvga_get_crtc(); - val = val * stdvga_vram_ratio(vmode_g) / 4; + val = val * stdvga_vram_ratio(curmode_g) / 4; stdvga_crtc_write(crtc_addr, 0x0c, val >> 8); stdvga_crtc_write(crtc_addr, 0x0d, val); return 0; } int -stdvga_get_dacformat(struct vgamode_s *vmode_g) +stdvga_get_dacformat(struct vgamode_s *curmode_g) { return -1; } int -stdvga_set_dacformat(struct vgamode_s *vmode_g, int val) +stdvga_set_dacformat(struct vgamode_s *curmode_g, int val) { return -1; } |