aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2015-07-30 12:42:47 -0400
committerKevin O'Connor <kevin@koconnor.net>2015-08-04 09:19:03 -0400
commit33617ef43ebdf36b579acb1c4a4fb6f2df4cdbdc (patch)
tree0b9c24d8c5cc88a34a574a487fdbf5adddb6f101
parent4bfd7f221ce86325affa086e90f8c6f4245fbe3e (diff)
downloadseabios-hppa-33617ef43ebdf36b579acb1c4a4fb6f2df4cdbdc.zip
seabios-hppa-33617ef43ebdf36b579acb1c4a4fb6f2df4cdbdc.tar.gz
seabios-hppa-33617ef43ebdf36b579acb1c4a4fb6f2df4cdbdc.tar.bz2
vgafb: Minor - move gfx_common() variables outside of switch statement
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--vgasrc/vgafb.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/vgasrc/vgafb.c b/vgasrc/vgafb.c
index 1a94fcf..5d1ecc9 100644
--- a/vgasrc/vgafb.c
+++ b/vgasrc/vgafb.c
@@ -273,28 +273,22 @@ gfx_direct(struct gfx_op *op)
int bypp = DIV_ROUND_UP(depth, 8);
void *dest_far = (fb + op->displaystart + op->y * op->linelength
+ op->x * bypp);
+ u8 data[64];
+ int i;
switch (op->op) {
default:
- case GO_READ8: {
- u8 data[64];
+ case GO_READ8:
memcpy_high(MAKE_FLATPTR(GET_SEG(SS), data), dest_far, bypp * 8);
- int i;
for (i=0; i<8; i++)
op->pixels[i] = reverse_color(depth, *(u32*)&data[i*bypp]);
break;
- }
- case GO_WRITE8: {
- u8 data[64];
- int i;
+ case GO_WRITE8:
for (i=0; i<8; i++)
*(u32*)&data[i*bypp] = get_color(depth, op->pixels[i]);
memcpy_high(dest_far, MAKE_FLATPTR(GET_SEG(SS), data), bypp * 8);
break;
- }
- case GO_MEMSET: {
+ case GO_MEMSET: ;
u32 color = get_color(depth, op->pixels[0]);
- u8 data[64];
- int i;
for (i=0; i<8; i++)
*(u32*)&data[i*bypp] = color;
memcpy_high(dest_far, MAKE_FLATPTR(GET_SEG(SS), data), bypp * 8);
@@ -303,7 +297,6 @@ gfx_direct(struct gfx_op *op)
memcpy_high(dest_far + op->linelength * i
, dest_far, op->xlen * bypp);
break;
- }
case GO_MEMMOVE: ;
void *src_far = (fb + op->displaystart + op->srcy * op->linelength
+ op->x * bypp);