From 22c91412600b7fabd75ef68d2d4d3e63e9e27f9f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 1 Apr 2024 11:27:57 -0400 Subject: stdvga: Rename stdvga_get_vde() to stdvga_get_vertical_size() Signed-off-by: Kevin O'Connor --- vgasrc/stdvga.c | 8 ++++---- vgasrc/stdvga.h | 2 +- vgasrc/vgabios.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vgasrc/stdvga.c b/vgasrc/stdvga.c index a5972baa..4bfa101a 100644 --- a/vgasrc/stdvga.c +++ b/vgasrc/stdvga.c @@ -275,15 +275,15 @@ stdvga_set_character_height(u8 lines) stdvga_crtc_mask(stdvga_get_crtc(), 0x09, 0x1f, lines - 1); } -// Get vertical display end +// Get vertical screen size (number of horizontal lines in the display) u16 -stdvga_get_vde(void) +stdvga_get_vertical_size(void) { u16 crtc_addr = stdvga_get_crtc(); u16 vde = stdvga_crtc_read(crtc_addr, 0x12); u8 ovl = stdvga_crtc_read(crtc_addr, 0x07); - vde += (((ovl & 0x02) << 7) + ((ovl & 0x40) << 3) + 1); - return vde; + vde += ((ovl & 0x02) << 7) + ((ovl & 0x40) << 3); + return vde + 1; } // Get offset into framebuffer accessible from real-mode 64K segment diff --git a/vgasrc/stdvga.h b/vgasrc/stdvga.h index 439930a3..18285852 100644 --- a/vgasrc/stdvga.h +++ b/vgasrc/stdvga.h @@ -66,7 +66,7 @@ int stdvga_vram_ratio(struct vgamode_s *vmode_g); void stdvga_set_cursor_shape(u16 cursor_type); void stdvga_set_cursor_pos(int address); void stdvga_set_character_height(u8 lines); -u16 stdvga_get_vde(void); +u16 stdvga_get_vertical_size(void); int stdvga_get_window(struct vgamode_s *curmode_g, int window); int stdvga_set_window(struct vgamode_s *curmode_g, int window, int val); int stdvga_minimum_linelength(struct vgamode_s *vmode_g); diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c index a68cae1f..3659f01e 100644 --- a/vgasrc/vgabios.c +++ b/vgasrc/vgabios.c @@ -138,8 +138,8 @@ set_character_height(u8 lines) { stdvga_set_character_height(lines); SET_BDA(char_height, lines); - u16 vde = stdvga_get_vde(); - u8 rows = vde / lines; + u16 vertical_size = stdvga_get_vertical_size(); + u8 rows = vertical_size / lines; SET_BDA(video_rows, rows - 1); u16 cols = GET_BDA(video_cols); SET_BDA(video_pagesize, calc_page_size(MM_TEXT, cols, rows)); -- cgit