From 5a3e91643da50c0847b5190c814d8d355b3ae1a3 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sun, 5 Jan 2014 12:19:25 +0000 Subject: [PATCH] Some corrections. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3853 --- src/gui/sdl_mapper.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/gui/sdl_mapper.cpp b/src/gui/sdl_mapper.cpp index 1c6b700a..958c7a28 100644 --- a/src/gui/sdl_mapper.cpp +++ b/src/gui/sdl_mapper.cpp @@ -520,11 +520,12 @@ protected: }; #define MAX_VJOY_BUTTONS 8 - +#define MAX_VJOY_HAT 16 +#define MAX_VJOY_AXIS 8 static struct { bool button_pressed[MAX_VJOY_BUTTONS]; - Bit16s axis_pos[8]; - bool hat_pressed[16]; + Bit16s axis_pos[MAX_VJOY_AXIS]; + bool hat_pressed[MAX_VJOY_HAT]; } virtual_joysticks[2]; @@ -2390,15 +2391,17 @@ void MAPPER_StartUp(Section * sec) { mapper.sticks.num=0; mapper.sticks.num_groups=0; Bitu i; - for (i=0; i<16; i++) { + for (i=0; i