summaryrefslogtreecommitdiff
path: root/source/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/keyboard.c')
-rw-r--r--source/keyboard.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source/keyboard.c b/source/keyboard.c
index 37ae4ef..8853dd1 100644
--- a/source/keyboard.c
+++ b/source/keyboard.c
@@ -29,8 +29,6 @@
/* ---------------------------------------- STATIC DATA
*/
-static uint16 white = FB_RGB(31, 31, 31);
-static uint16 black = FB_RGB(0, 0, 0);
static struct
{
@@ -238,7 +236,8 @@ static int GetEvent(SoftKeyEvent *ev, int map)
x = 3 + (f % 10) * 25;
y = 37 + (f / 10) * 30;
- FB_Box(x, y, 25, 18, key_state[f].new_state ? white:black);
+ FB_Box(x, y, 25, 18, key_state[f].new_state ?
+ COL_WHITE : COL_BLACK);
}
}
}
@@ -270,11 +269,16 @@ static int GetEvent(SoftKeyEvent *ev, int map)
*/
void SK_DisplayKeyboard(uint16 *vram)
{
- sImage img;
+ static sImage img;
+ static int loaded;
- loadPCX(keyb_bin,&img);
- image8to16(&img);
- dmaCopy(img.image.data8,vram,SCREEN_WIDTH*SCREEN_HEIGHT*2);
+ if (!loaded)
+ {
+ loadPCX(keyb_bin,&img);
+ loaded = true;
+ }
+
+ FB_Blit(&img,0,0,110);
}