]> granicus.if.org Git - nethack/commitdiff
fix misplaced #if in sys/msdos/pckeys.c
authorPatR <rankin@nethack.org>
Mon, 31 Jul 2017 01:43:47 +0000 (18:43 -0700)
committerPatR <rankin@nethack.org>
Mon, 31 Jul 2017 01:43:47 +0000 (18:43 -0700)
Reported directly to devteam, so no #H number.  If SIMULATE_CURSOR
isn't defined, there would be no switch statement to attach the
subsequent cases to.

The suggested fix is obviously correct, but untested....

sys/msdos/pckeys.c

index 352c916e8c8256d6450add6af806f7e343fadabe..ec59b999dae63f6d6b75255f3704201ae5f58a44 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 pckeys.c        $NHDT-Date: 1457207039 2016/03/05 19:43:59 $  $NHDT-Branch: chasonr $:$NHDT-Revision: 1.11 $ */
+/* NetHack 3.6 pckeys.c        $NHDT-Date: 1501465420 2017/07/31 01:43:40 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $ */
 /* Copyright (c) NetHack PC Development Team 1996                 */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -39,8 +39,8 @@ unsigned char shift;
     boolean opening_dialog;
 
     opening_dialog = pl_character[0] ? FALSE : TRUE;
-#ifdef SIMULATE_CURSOR
     switch (scancode) {
+#ifdef SIMULATE_CURSOR
     case 0x3d: /* F3 = toggle cursor type */
         HideCursor();
         cursor_type += 1;
@@ -53,7 +53,6 @@ unsigned char shift;
         if ((shift & CTRL) && iflags.tile_view && !opening_dialog)
             userpan(1);
         break;
-
     case 0x73: /* Control-left_arrow = scroll horizontal to left */
         if ((shift & CTRL) && iflags.tile_view && !opening_dialog)
             userpan(0);