--- np2/wince/winkbd.cpp 2003/12/01 21:15:13 1.3 +++ np2/wince/winkbd.cpp 2005/02/07 14:46:15 1.6 @@ -4,16 +4,15 @@ #endif #include "np2.h" #include "winkbd.h" -#include "pccore.h" -#include "iocore.h" +#include "keystat.h" #define NC 0xff #if defined(WIN32_PLATFORM_PSPC) -static BYTE key106[256] = +static UINT8 key106[256] = #else -static const BYTE key106[256] = +static const UINT8 key106[256] = #endif // , , ,STOP, , , , ; 0x00 { NC, NC, NC,0x60, NC, NC, NC, NC, @@ -81,9 +80,9 @@ static const BYTE key106[256] = NC, NC, NC, NC, NC, NC, NC, NC}; #if defined(WIN32_PLATFORM_PSPC) -static BYTE key106ext[256] = +static UINT8 key106ext[256] = #else -static const BYTE key106ext[256] = +static const UINT8 key106ext[256] = #endif // , , ,STOP, , , , ; 0x00 { NC, NC, NC, NC, NC, NC, NC, NC, @@ -150,16 +149,16 @@ static const BYTE key106ext[256] = // , , , , , , , ; 0xf8 NC, NC, NC, NC, NC, NC, NC, NC}; -static const BYTE f12keys[] = { +static const UINT8 f12keys[] = { 0x61, 0x60, 0x4d, 0x4f}; -static BYTE getf12key(void) { +static UINT8 getf12key(void) { UINT key; key = np2oscfg.F12KEY - 1; - if (key < (sizeof(f12keys)/sizeof(BYTE))) { + if (key < NELEMENTS(f12keys)) { return(f12keys[key]); } else { @@ -169,7 +168,7 @@ static BYTE getf12key(void) { void winkbd_keydown(WPARAM wParam, LPARAM lParam) { - BYTE data; + UINT8 data; if (wParam != VK_F12) { data = key106[wParam & 0xff]; @@ -195,7 +194,7 @@ void winkbd_keydown(WPARAM wParam, LPARA void winkbd_keyup(WPARAM wParam, LPARAM lParam) { - BYTE data; + UINT8 data; if (wParam != VK_F12) { data = key106[wParam & 0xff]; @@ -209,7 +208,7 @@ void winkbd_keyup(WPARAM wParam, LPARAM keystat_senddata(0x70 | 0x80); // PC/AT only data = key106ext[wParam & 0xff]; } - keystat_senddata((BYTE)(data | 0x80)); + keystat_senddata((UINT8)(data | 0x80)); } else { // ver0.28 if (wParam == 0x0c) { @@ -223,7 +222,7 @@ void winkbd_resetf12(void) { UINT i; - for (i=0; i<(sizeof(f12keys)/sizeof(BYTE)); i++) { + for (i=0; i