From 9540760f9429bfe71894c801e85cec95e3887f8c Mon Sep 17 00:00:00 2001 From: sparky4 Date: Fri, 24 Sep 2021 11:02:00 -0500 Subject: [PATCH] no idea how to get joy buttons 2 and 3 to function. --- src/inputest.c | 2 +- src/lib/16_in.c | 4 ++-- src/lib/16_in.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/inputest.c b/src/inputest.c index 7f3b8287..a27c2dd5 100755 --- a/src/inputest.c +++ b/src/inputest.c @@ -45,7 +45,7 @@ main(int argc, char *argv[]) ctrl_Keyboard1 #endif #if defined(INPUTEST_JOYSTICKPADTEST) && !defined(INPUTEST_MOUSETEST) - ctrl_Joystick2 + ctrl_Joystick1 #endif #if !defined(INPUTEST_JOYSTICKPADTEST) && defined(INPUTEST_MOUSETEST) ctrl_Mouse diff --git a/src/lib/16_in.c b/src/lib/16_in.c index 834e3b37..6dc41edc 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -1298,9 +1298,9 @@ byte IN_MouseButtons (global_game_variables_t *gvar) =================== */ -byte IN_JoyButtons (void) +word IN_JoyButtons (void) { - byte joybits; + word joybits; joybits = inportb(0x201); // Get all the joystick buttons joybits >>= 4; // only the high bits are useful diff --git a/src/lib/16_in.h b/src/lib/16_in.h index 329788d1..e85b624a 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -242,7 +242,7 @@ extern byte *IN_GetScanName(ScanCode); byte IN_MouseButtons (global_game_variables_t *gvar); -byte IN_JoyButtons (void); +word IN_JoyButtons (void); void INL_GetJoyDelta(word joy,int *dx,int *dy/*,boolean adaptive*/, global_game_variables_t *gvar); void IN_StartAck(global_game_variables_t *gvar); -- 2.39.5