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