From: nhmall Date: Tue, 3 Dec 2019 04:20:55 +0000 (-0500) Subject: Merge branch 'NetHack-3.6' X-Git-Tag: NetHack-3.7.0_WIP~178 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2b1034dd26474eb2044b226a526829fd2227c74;p=nethack Merge branch 'NetHack-3.6' --- f2b1034dd26474eb2044b226a526829fd2227c74 diff --cc sys/winnt/nttty.c index a9dbaa072,9c96ae8a4..1c46c8cb2 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@@ -451,10 -461,15 +461,15 @@@ tgetch( really_move_cursor(); if (iflags.debug_fuzzer) return randomkey(); + #ifdef QWERTZ_SUPPORT + if (Cmd.swap_yz) + numpad |= 0x10; + #endif + - return (program_state.done_hup) + 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;