aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc/vbe.c
diff options
context:
space:
mode:
Diffstat (limited to 'vgasrc/vbe.c')
-rw-r--r--vgasrc/vbe.c51
1 files changed, 26 insertions, 25 deletions
diff --git a/vgasrc/vbe.c b/vgasrc/vbe.c
index d7ce9413..3efb54f5 100644
--- a/vgasrc/vbe.c
+++ b/vgasrc/vbe.c
@@ -260,18 +260,18 @@ vbe_104f05(struct bregs *regs)
regs->ah = VBE_RETURN_STATUS_INVALID;
return;
}
- struct vgamode_s *vmode_g = get_current_mode();
- if (! vmode_g)
+ struct vgamode_s *curmode_g = get_current_mode();
+ if (! curmode_g)
goto fail;
if (regs->bh) {
- int ret = vgahw_get_window(vmode_g, regs->bl);
+ int ret = vgahw_get_window(curmode_g, regs->bl);
if (ret < 0)
goto fail;
regs->dx = ret;
regs->ax = 0x004f;
return;
}
- int ret = vgahw_set_window(vmode_g, regs->bl, regs->dx);
+ int ret = vgahw_set_window(curmode_g, regs->bl, regs->dx);
if (ret)
goto fail;
regs->ax = 0x004f;
@@ -285,21 +285,22 @@ vbe_104f06(struct bregs *regs)
{
if (regs->bl > 0x02)
goto fail;
- struct vgamode_s *vmode_g = get_current_mode();
- if (! vmode_g)
+ struct vgamode_s *curmode_g = get_current_mode();
+ if (! curmode_g)
goto fail;
- int bpp = vga_bpp(vmode_g);
+ int bpp = vga_bpp(curmode_g);
if (regs->bl == 0x00) {
- int ret = vgahw_set_linelength(vmode_g, DIV_ROUND_UP(regs->cx * bpp, 8));
+ int ret = vgahw_set_linelength(curmode_g
+ , DIV_ROUND_UP(regs->cx * bpp, 8));
if (ret)
goto fail;
} else if (regs->bl == 0x02) {
- int ret = vgahw_set_linelength(vmode_g, regs->cx);
+ int ret = vgahw_set_linelength(curmode_g, regs->cx);
if (ret)
goto fail;
}
- int linelength = vgahw_get_linelength(vmode_g);
+ int linelength = vgahw_get_linelength(curmode_g);
if (linelength < 0)
goto fail;
@@ -315,11 +316,11 @@ fail:
static void
vbe_104f07(struct bregs *regs)
{
- struct vgamode_s *vmode_g = get_current_mode();
- if (! vmode_g)
+ struct vgamode_s *curmode_g = get_current_mode();
+ if (! curmode_g)
goto fail;
- int bpp = vga_bpp(vmode_g);
- int linelength = vgahw_get_linelength(vmode_g);
+ int bpp = vga_bpp(curmode_g);
+ int linelength = vgahw_get_linelength(curmode_g);
if (linelength < 0)
goto fail;
@@ -328,12 +329,12 @@ vbe_104f07(struct bregs *regs)
case 0x80:
case 0x00:
ret = vgahw_set_displaystart(
- vmode_g, DIV_ROUND_UP(regs->cx * bpp, 8) + linelength * regs->dx);
+ curmode_g, DIV_ROUND_UP(regs->cx * bpp, 8) + linelength * regs->dx);
if (ret)
goto fail;
break;
case 0x01:
- ret = vgahw_get_displaystart(vmode_g);
+ ret = vgahw_get_displaystart(curmode_g);
if (ret < 0)
goto fail;
regs->dx = ret / linelength;
@@ -351,10 +352,10 @@ fail:
static void
vbe_104f08(struct bregs *regs)
{
- struct vgamode_s *vmode_g = get_current_mode();
- if (! vmode_g)
+ struct vgamode_s *curmode_g = get_current_mode();
+ if (! curmode_g)
goto fail;
- u8 memmodel = GET_GLOBAL(vmode_g->memmodel);
+ u8 memmodel = GET_GLOBAL(curmode_g->memmodel);
if (memmodel == MM_DIRECT || memmodel == MM_YUV) {
regs->ax = 0x034f;
return;
@@ -362,11 +363,11 @@ vbe_104f08(struct bregs *regs)
if (regs->bl > 1)
goto fail;
if (regs->bl == 0) {
- int ret = vgahw_set_dacformat(vmode_g, regs->bh);
+ int ret = vgahw_set_dacformat(curmode_g, regs->bh);
if (ret < 0)
goto fail;
}
- int ret = vgahw_get_dacformat(vmode_g);
+ int ret = vgahw_get_dacformat(curmode_g);
if (ret < 0)
goto fail;
regs->bh = ret;
@@ -385,11 +386,11 @@ vbe_104f09(struct bregs *regs)
return;
}
- struct vgamode_s *vmode_g = get_current_mode();
- if (! vmode_g)
+ struct vgamode_s *curmode_g = get_current_mode();
+ if (! curmode_g)
goto fail;
- u8 memmodel = GET_GLOBAL(vmode_g->memmodel);
- u8 depth = GET_GLOBAL(vmode_g->depth);
+ u8 memmodel = GET_GLOBAL(curmode_g->memmodel);
+ u8 depth = GET_GLOBAL(curmode_g->depth);
if (memmodel == MM_DIRECT || memmodel == MM_YUV || depth > 8) {
regs->ax = 0x034f;
return;