From dce21606ab2b29218d5094864823184c22f114b6 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Sun, 17 Mar 2002 17:07:22 +0000 Subject: [PATCH] (from Yitzhak) ALT-? This patch allows ALT-? to do #? in NetHack mode by not doing TranslateAccelerator in NetHack mode. This relies on the short circuit logic of || (much of NetHack code relies on it, it's just an explanatory note). --- win/win32/mswproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 53841688b..5e82201f0 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -1702,7 +1702,9 @@ void mswin_main_loop() while( !mswin_have_input() && GetMessage(&msg, NULL, 0, 0)!=0 ) { - if (!TranslateAccelerator(msg.hwnd, GetNHApp()->hAccelTable, &msg)) { + if (GetNHApp()->regNetHackMode || + !TranslateAccelerator(msg.hwnd, GetNHApp()->hAccelTable, &msg)) + { TranslateMessage(&msg); DispatchMessage(&msg); }