]> granicus.if.org Git - nethack/commitdiff
Merge branch 'NetHack-3.6'
authornhmall <nhmall@nethack.org>
Tue, 3 Dec 2019 04:20:55 +0000 (23:20 -0500)
committernhmall <nhmall@nethack.org>
Tue, 3 Dec 2019 04:20:55 +0000 (23:20 -0500)
1  2 
include/ntconf.h
sys/winnt/nhdefkey.c
sys/winnt/nttty.c

Simple merge
Simple merge
index a9dbaa0729b62443ce4a3f54bd704ab78b8c8e7d,9c96ae8a4bac43951ab44b449d6d4fa02e52cf8e..1c46c8cb2a26f2afa0acf2fb335335dbda978a7f
@@@ -451,10 -461,15 +461,15 @@@ tgetch(
      really_move_cursor();
      if (iflags.debug_fuzzer)
          return randomkey();
 -    return (program_state.done_hup)
+ #ifdef QWERTZ_SUPPORT
+     if (Cmd.swap_yz)
+         numpad |= 0x10;
+ #endif
 +    return (g.program_state.done_hup)
                 ? '\033'
                 : keyboard_handler.pCheckInput(
-                    console.hConIn, &ir, &count, iflags.num_pad, 0, &mod, &cc);
+                    console.hConIn, &ir, &count, numpad, 0, &mod, &cc);
  }
  
  int
@@@ -464,20 -479,22 +479,31 @@@ int *x, *y, *mod
      int ch;
      coord cc;
      DWORD count;
+     boolean numpad = iflags.num_pad;
      really_move_cursor();
 -    if (iflags.debug_fuzzer)
 -        return randomkey();
 +    if (iflags.debug_fuzzer) {
 +        int poskey = randomkey();
 +
 +        if (poskey == 0) {
 +            *x = rn2(console.width);
 +            *y = rn2(console.height);
-         }
++        if (poskey == 0) {
++            *x = rn2(console.width);
++            *y = rn2(console.height);        }
 +        return poskey;
 +    }
+ #ifdef QWERTZ_SUPPORT
+     if (Cmd.swap_yz)
+         numpad |= 0x10;
+ #endif
 -    ch = (program_state.done_hup)
 +    ch = (g.program_state.done_hup)
               ? '\033'
               : keyboard_handler.pCheckInput(
-                    console.hConIn, &ir, &count, iflags.num_pad, 1, mod, &cc);
+                    console.hConIn, &ir, &count, numpad, 1, mod, &cc);
+ #ifdef QWERTZ_SUPPORT
+     numpad &= ~0x10;
+ #endif
      if (!ch) {
          *x = cc.x;
          *y = cc.y;