From 10f5988e62334461449c6aba0ebafedfa6a910dd Mon Sep 17 00:00:00 2001 From: mjbudd77 Date: Mon, 2 Aug 2021 21:58:06 -0400 Subject: [PATCH] Initialize button states to zero. --- src/drivers/Qt/sdl-joystick.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/drivers/Qt/sdl-joystick.cpp b/src/drivers/Qt/sdl-joystick.cpp index 5bfd68f8..a076f6e6 100644 --- a/src/drivers/Qt/sdl-joystick.cpp +++ b/src/drivers/Qt/sdl-joystick.cpp @@ -338,6 +338,10 @@ GamePad_t::GamePad_t(void) bmap[c][i].state = 0; } } + for (int i = 0; i < GAMEPAD_NUM_BUTTONS; i++) + { + bmapState[i] = 0; + } } //******************************************************************************** GamePad_t::~GamePad_t(void)