From d3756e748952ea6440e95a633641b45520009f4c Mon Sep 17 00:00:00 2001 From: mcmartin Date: Thu, 10 Feb 2005 06:15:05 +0000 Subject: [PATCH] Nonexistent joysticks will not crash the game anymore (Bug #660) git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1529 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/input/sdl/vcontrol.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sc2/src/sc2code/libs/input/sdl/vcontrol.c b/sc2/src/sc2code/libs/input/sdl/vcontrol.c index 4169d441d..d95404817 100644 --- a/sc2/src/sc2code/libs/input/sdl/vcontrol.c +++ b/sc2/src/sc2code/libs/input/sdl/vcontrol.c @@ -1362,7 +1362,8 @@ parse_joybinding (parse_state *state, int *target) { if (VControl_AddJoyAxisBinding (sticknum, axisnum, polarity, target)) { - state->error = 1; + // Don't count this as an error + // state->error = 1; } } } @@ -1376,7 +1377,8 @@ parse_joybinding (parse_state *state, int *target) { if (VControl_AddJoyButtonBinding (sticknum, buttonnum, target)) { - state->error = 1; + // Don't count this as an error + // state->error = 1; } } } @@ -1392,7 +1394,8 @@ parse_joybinding (parse_state *state, int *target) { if (VControl_AddJoyHatBinding (sticknum, hatnum, dir, target)) { - state->error = 1; + // Don't count this as an error + // state->error = 1; } } }