ForceFeedback: workaround for crash on keyboard configurations
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6521 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 1f1e3f261e4ed9d1f5cb55ff295651ef626250ce Former-commit-id: 5aea7e4cb2004d476300cfdd573b42cd9bd1e7b6
This commit is contained in:
parent
d1ccb702ac
commit
1f2e3e3261
1 changed files with 6 additions and 1 deletions
|
@ -1176,7 +1176,12 @@ static void common_drive(const int index, tCarElt* car, tSituation *s)
|
|||
#if SDL_FORCEFEEDBACK
|
||||
|
||||
//send force feedback effect to the wheel
|
||||
gfctrlJoyConstantForce(int((cmd[CMD_LEFTSTEER].val) / GFCTRL_JOY_NUMBER), forceFeedback.updateForce(car, s), 0 );
|
||||
//dont' even try to do it if steer command is on a keyboard because it somehow manage to crash (unable to identify the joystic to send FF to?)
|
||||
if(cmd[CMD_LEFTSTEER].type != GFCTRL_TYPE_KEYBOARD){
|
||||
// v<- this controller detenction does not make ->v
|
||||
// v<- sense to me ->v
|
||||
gfctrlJoyConstantForce(int((cmd[CMD_LEFTSTEER].val) / GFCTRL_JOY_NUMBER), forceFeedback.updateForce(car, s), 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue