Diff for /np2/keystat.c between versions 1.14 and 1.17

version 1.14, 2004/04/05 09:45:06 version 1.17, 2005/02/07 14:46:07
Line 88  const KEYNAME *n; Line 88  const KEYNAME *n;
 const KEYNAME   *nterm;  const KEYNAME   *nterm;
   
         n = keyname;          n = keyname;
         nterm = keyname + (sizeof(keyname) / sizeof(KEYNAME));          nterm = keyname + NELEMENTS(keyname);
         while(n < nterm) {          while(n < nterm) {
                 if (!milstr_cmp(n->str, str)) {                  if (!milstr_cmp(n->str, str)) {
                         return(n->num);                          return(n->num);
Line 197  void keystat_ctrlreset(void) { Line 197  void keystat_ctrlreset(void) {
   
 void keystat_ctrlsend(REG8 dat) {  void keystat_ctrlsend(REG8 dat) {
   
         return;  
   
         if (!keyctrl.reqparam) {          if (!keyctrl.reqparam) {
                 keyctrl.mode = dat;                  keyctrl.mode = dat;
                 switch(dat) {                  switch(dat) {
Line 272  void keystat_down(const UINT8 *key, REG8 Line 270  void keystat_down(const UINT8 *key, REG8
                 keydata = *key++;                  keydata = *key++;
                 keycode = (keydata & 0x7f);                  keycode = (keydata & 0x7f);
                 if (keycode < 0x70) {                  if (keycode < 0x70) {
   #if 1                                                                                           // 05/02/04
                           if (keystat.ref[keycode] != NKEYREF_NC) {
                                   if (!(kbexflag[keycode] & KBEX_NONREP)) {
                                           keyboard_send((REG8)(keycode + 0x80));
                                           keystat.ref[keycode] = NKEYREF_NC;
                                   }
                           }
                           if (keystat.ref[keycode] == NKEYREF_NC) {
                                   keyboard_send(keycode);
                           }
   #else
                         if ((keystat.ref[keycode] == NKEYREF_NC) ||                          if ((keystat.ref[keycode] == NKEYREF_NC) ||
                                 (!(kbexflag[keycode] & KBEX_NONREP))) {                                  (!(kbexflag[keycode] & KBEX_NONREP))) {
                                 keyboard_send(keycode);                                  keyboard_send(keycode);
                         }                          }
   #endif
                         keystat.ref[keycode] = ref;                          keystat.ref[keycode] = ref;
                 }                  }
                 else {                  else {

Removed from v.1.14  
changed lines
  Added in v.1.17


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