diff options
author | wkoszek <wkoszek@FreeBSD.org> | 2007-12-29 23:26:59 +0000 |
---|---|---|
committer | wkoszek <wkoszek@FreeBSD.org> | 2007-12-29 23:26:59 +0000 |
commit | bb029b61d9d00673b61ff3bd4589761e3ddbd060 (patch) | |
tree | 2208d9a465b1ecf2354401f83d3b431d9003169a /sys/dev/syscons/logo | |
parent | 8a0ce839351386ec837779aa9f63b575cf8d096a (diff) | |
download | FreeBSD-src-bb029b61d9d00673b61ff3bd4589761e3ddbd060.zip FreeBSD-src-bb029b61d9d00673b61ff3bd4589761e3ddbd060.tar.gz |
Replace explicit calls to video methods with their respective variants
implemented with macros. This patch improves code readability. Reasoning
behind vidd_* is a sort of "video discipline".
List of macros is supposed to be complete--all methods of video_switch
ought to have their respective macros from now on.
Functionally, this code should be no-op. My intention is to leave current
behaviour of touched code as is.
No objections: rwatson
Silence on: freebsd-current@
Approved by: cognet
Diffstat (limited to 'sys/dev/syscons/logo')
-rw-r--r-- | sys/dev/syscons/logo/logo_saver.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/syscons/logo/logo_saver.c b/sys/dev/syscons/logo/logo_saver.c index 20f2bdc..c77edfb 100644 --- a/sys/dev/syscons/logo/logo_saver.c +++ b/sys/dev/syscons/logo/logo_saver.c @@ -45,7 +45,7 @@ #define SET_ORIGIN(adp, o) do { \ int oo = o; \ if (oo != last_origin) \ - set_origin(adp, last_origin = oo); \ + vidd_set_win_org(adp, last_origin = oo); \ } while (0) extern unsigned int logo_w; @@ -114,15 +114,15 @@ logo_saver(video_adapter_t *adp, int blank) /* switch to graphics mode */ if (blanked <= 0) { pl = splhigh(); - set_video_mode(adp, scrmode); - load_palette(adp, logo_pal); - set_border(adp, 0); + vidd_set_mode(adp, scrmode); + vidd_load_palette(adp, logo_pal); + vidd_set_border(adp, 0); blanked++; vid = (u_char *)adp->va_window; banksize = adp->va_window_size; bpsl = adp->va_line_width; splx(pl); - (*vidsw[adp->va_index]->clear)(adp); + vidd_clear(adp); } logo_update(adp); } else { @@ -136,13 +136,13 @@ logo_init(video_adapter_t *adp) { video_info_t info; - if (!get_mode_info(adp, M_VESA_CG800x600, &info)) { + if (!vidd_get_info(adp, M_VESA_CG800x600, &info)) { scrmode = M_VESA_CG800x600; - } else if (!get_mode_info(adp, M_VGA_CG320, &info)) { + } else if (!vidd_get_info(adp, M_VGA_CG320, &info)) { scrmode = M_VGA_CG320; - } else if (!get_mode_info(adp, M_PC98_PEGC640x480, &info)) { + } else if (!vidd_get_info(adp, M_PC98_PEGC640x480, &info)) { scrmode = M_PC98_PEGC640x480; - } else if (!get_mode_info(adp, M_PC98_PEGC640x400, &info)) { + } else if (!vidd_get_info(adp, M_PC98_PEGC640x400, &info)) { scrmode = M_PC98_PEGC640x400; } else { log(LOG_NOTICE, |