Diff for /np2/win9xc/winkbd.cpp between versions 1.3 and 1.4

version 1.3, 2004/02/18 06:19:01 version 1.4, 2005/02/07 14:46:15
Line 6 Line 6
   
 #define         NC              0xff  #define         NC              0xff
   
 static const BYTE key106[256] = {  static const UINT8 key106[256] = {
                         //          ,    ,    ,STOP,    ,    ,    ,             ; 0x00                          //          ,    ,    ,STOP,    ,    ,    ,             ; 0x00
                                   NC,  NC,  NC,0x60,  NC,  NC,  NC,  NC,                                    NC,  NC,  NC,0x60,  NC,  NC,  NC,  NC,
                         //        BS, TAB,    ,    , CLR, ENT,    ,             ; 0x08                          //        BS, TAB,    ,    , CLR, ENT,    ,             ; 0x08
Line 72  static const BYTE key106[256] = { Line 72  static const BYTE key106[256] = {
                         //          ,    ,    ,    ,    ,    ,    ,             ; 0xf8                          //          ,    ,    ,    ,    ,    ,    ,             ; 0xf8
                                   NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC};                                    NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC};
   
 static const BYTE key106ext[256] = {  static const UINT8 key106ext[256] = {
                         //          ,    ,    ,STOP,    ,    ,    ,             ; 0x00                          //          ,    ,    ,STOP,    ,    ,    ,             ; 0x00
                                   NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC,                                    NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC,
                         //        BS, TAB,    ,    , CLR, ENT,    ,             ; 0x08                          //        BS, TAB,    ,    , CLR, ENT,    ,             ; 0x08
Line 138  static const BYTE key106ext[256] = { Line 138  static const BYTE key106ext[256] = {
                         //          ,    ,    ,    ,    ,    ,    ,             ; 0xf8                          //          ,    ,    ,    ,    ,    ,    ,             ; 0xf8
                                   NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC};                                    NC,  NC,  NC,  NC,  NC,  NC,  NC,  NC};
   
 static const BYTE f12keys[] = {  static const UINT8 f12keys[] = {
                         0x61, 0x60, 0x4d, 0x4f};                          0x61, 0x60, 0x4d, 0x4f};
   
   
 static BYTE getf12key(void) {  static UINT8 getf12key(void) {
   
         UINT    key;          UINT    key;
   
         key = np2oscfg.F12COPY - 1;          key = np2oscfg.F12COPY - 1;
         if (key < (sizeof(f12keys)/sizeof(BYTE))) {          if (key < NELEMENTS(f12keys)) {
                 return(f12keys[key]);                  return(f12keys[key]);
         }          }
         else {          else {
Line 157  static BYTE getf12key(void) { Line 157  static BYTE getf12key(void) {
   
 void winkbd_keydown(WPARAM wParam, LPARAM lParam) {  void winkbd_keydown(WPARAM wParam, LPARAM lParam) {
   
         BYTE    data;          UINT8   data;
   
         if (wParam != VK_F12) {          if (wParam != VK_F12) {
                 data = key106[wParam & 0xff];                  data = key106[wParam & 0xff];
Line 189  void winkbd_keydown(WPARAM wParam, LPARA Line 189  void winkbd_keydown(WPARAM wParam, LPARA
   
 void winkbd_keyup(WPARAM wParam, LPARAM lParam) {  void winkbd_keyup(WPARAM wParam, LPARAM lParam) {
   
         BYTE    data;          UINT8   data;
   
         if (wParam != VK_F12) {          if (wParam != VK_F12) {
                 data = key106[wParam & 0xff];                  data = key106[wParam & 0xff];
Line 209  void winkbd_keyup(WPARAM wParam, LPARAM  Line 209  void winkbd_keyup(WPARAM wParam, LPARAM 
                         keystat_senddata(0x70 | 0x80);                          // PC/AT only                          keystat_senddata(0x70 | 0x80);                          // PC/AT only
                         data = key106ext[wParam & 0xff];                          data = key106ext[wParam & 0xff];
                 }                  }
                 keystat_senddata((BYTE)(data | 0x80));                  keystat_senddata((UINT8)(data | 0x80));
         }          }
         else {                                                                                          // ver0.28          else {                                                                                          // ver0.28
                 if ((np2oscfg.KEYBOARD != KEY_PC98) && (wParam == 0x0c)) {                  if ((np2oscfg.KEYBOARD != KEY_PC98) && (wParam == 0x0c)) {
Line 223  void winkbd_resetf12(void) { Line 223  void winkbd_resetf12(void) {
   
         UINT    i;          UINT    i;
   
         for (i=0; i<(sizeof(f12keys)/sizeof(BYTE)); i++) {          for (i=0; i<NELEMENTS(f12keys); i++) {
                 keystat_forcerelease(f12keys[i]);                  keystat_forcerelease(f12keys[i]);
         }          }
 }  }

Removed from v.1.3  
changed lines
  Added in v.1.4


RetroPC.NET-CVS <cvs@retropc.net>