Completed fix for #660 (SetJoyThreshold failure won't crash game).

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1637 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
mcmartin
2005-04-17 16:30:21 +00:00
parent c4519a6766
commit 9766ee17d2
2 changed files with 14 additions and 10 deletions
+3
View File
@@ -1,4 +1,7 @@
Changes towards version 0.4:
- VControl parse errors suppressed unless critical - attempting to set
the threshold of a nonexistent joystick no longer makes the game refuse
to run (Bug #660, again) - Michael
- Properly handling Thraddash-Ilwrath mission overlap (bug #530) -Alex
- Separate 'ask for fuel' player responses for Mercury and Luna missions
(bug #716), from Nic
+11 -10
View File
@@ -238,7 +238,7 @@ VControl_SetJoyThreshold (int port, int threshold)
}
else
{
fprintf (stderr, "VControl_SetJoyThreshold passed illegal port %d\n", port);
// fprintf (stderr, "VControl_SetJoyThreshold passed illegal port %d\n", port);
return -1;
}
}
@@ -449,19 +449,19 @@ VControl_AddJoyAxisBinding (int port, int axis, int polarity, int *target)
}
else
{
fprintf (stderr, "VControl: Attempted to bind to polarity zero\n");
// fprintf (stderr, "VControl: Attempted to bind to polarity zero\n");
return -1;
}
}
else
{
fprintf (stderr, "VControl: Attempted to bind to illegal axis %d\n", axis);
// fprintf (stderr, "VControl: Attempted to bind to illegal axis %d\n", axis);
return -1;
}
}
else
{
fprintf (stderr, "VControl: Attempted to bind to illegal port %d\n", port);
// fprintf (stderr, "VControl: Attempted to bind to illegal port %d\n", port);
return -1;
}
return 0;
@@ -516,13 +516,13 @@ VControl_AddJoyButtonBinding (int port, int button, int *target)
}
else
{
fprintf (stderr, "VControl: Attempted to bind to illegal button %d\n", button);
// fprintf (stderr, "VControl: Attempted to bind to illegal button %d\n", button);
return -1;
}
}
else
{
fprintf (stderr, "VControl: Attempted to bind to illegal port %d\n", port);
// fprintf (stderr, "VControl: Attempted to bind to illegal port %d\n", port);
return -1;
}
}
@@ -578,20 +578,20 @@ VControl_AddJoyHatBinding (int port, int which, Uint8 dir, int *target)
}
else
{
fprintf (stderr, "VControl: Attempted to bind to illegal direction\n");
// fprintf (stderr, "VControl: Attempted to bind to illegal direction\n");
return -1;
}
return 0;
}
else
{
fprintf (stderr, "VControl: Attempted to bind to illegal hat %d\n", which);
// fprintf (stderr, "VControl: Attempted to bind to illegal hat %d\n", which);
return -1;
}
}
else
{
fprintf (stderr, "VControl: Attempted to bind to illegal port %d\n", port);
// fprintf (stderr, "VControl: Attempted to bind to illegal port %d\n", port);
return -1;
}
}
@@ -1459,7 +1459,8 @@ parse_config_line (parse_state *state)
{
if (VControl_SetJoyThreshold (sticknum, threshold))
{
state->error = 1;
// Don't count this as an error
// state->error = 1;
}
}
if (!state->error)