summaryrefslogtreecommitdiff
path: root/hw/kdrive
diff options
context:
space:
mode:
Diffstat (limited to 'hw/kdrive')
-rw-r--r--hw/kdrive/linux/keyboard.c12
-rw-r--r--hw/kdrive/vesa/vesa.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c
index 27757c3dd..97b0683de 100644
--- a/hw/kdrive/linux/keyboard.c
+++ b/hw/kdrive/linux/keyboard.c
@@ -118,16 +118,17 @@ readKernelMapping(void)
int i, j;
struct kbentry kbe;
int minKeyCode, maxKeyCode;
+ int row;
minKeyCode = NR_KEYS;
maxKeyCode = 0;
- k = kdKeymap;
- for (i = 0;
- i < NR_KEYS && (maxKeyCode - minKeyCode + 1) < KD_MAX_LENGTH;
- ++i)
+ row = 0;
+ for (i = 0; i < NR_KEYS && row < KD_MAX_LENGTH; ++i)
{
kbe.kb_index = i;
+ k = kdKeymap + row * KD_MAX_WIDTH;
+
for (j = 0; j < KD_MAX_WIDTH; ++j)
{
unsigned short kval;
@@ -367,8 +368,7 @@ readKernelMapping(void)
if (k[1] == k[0]) k[1] = NoSymbol;
if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
if (k[3] == k[0] && k[2] == k[1] && k[2] == NoSymbol) k[3] =NoSymbol;
-
- k += KD_MAX_WIDTH;
+ row++;
}
kdMinScanCode = minKeyCode;
kdMaxScanCode = maxKeyCode;
diff --git a/hw/kdrive/vesa/vesa.c b/hw/kdrive/vesa/vesa.c
index 9576bca04..74bfb857e 100644
--- a/hw/kdrive/vesa/vesa.c
+++ b/hw/kdrive/vesa/vesa.c
@@ -1428,7 +1428,7 @@ vesaEnable(ScreenPtr pScreen)
#include <sys/ioctl.h>
#define TOSH_PROC "/proc/toshiba"
#define TOSH_DEVICE "/dev/toshiba"
-#define TOSH_SMM _IOWR('t', 0x90, 24)
+#define TOSH_SMM _IOWR('t', 0x90, SMMRegisters)
typedef struct {
unsigned int eax;