mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 21:45:12 +00:00
Check for zero rumble setting before allowing rumble
Fixes controllers which don't check for rumble_strength and have constant rumble from rumbling even when set to 0 in the config.
This commit is contained in:
parent
f500541834
commit
468887a6f9
1 changed files with 6 additions and 2 deletions
|
@ -33,12 +33,16 @@ s32 osContInit(UNUSED OSMesgQueue *mq, u8 *controllerBits, UNUSED OSContStatus *
|
||||||
s32 osMotorStart(UNUSED void *pfs) {
|
s32 osMotorStart(UNUSED void *pfs) {
|
||||||
// Since rumble stops by osMotorStop, its duration is not nessecary.
|
// Since rumble stops by osMotorStop, its duration is not nessecary.
|
||||||
// Set it to 5 seconds and hope osMotorStop() is called in time.
|
// Set it to 5 seconds and hope osMotorStop() is called in time.
|
||||||
controller_rumble_play(configRumbleStrength / 100.0f, 5.0f);
|
if (configRumbleStrength>0){
|
||||||
|
controller_rumble_play(configRumbleStrength / 100.0f, 5.0f);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 osMotorStop(UNUSED void *pfs) {
|
s32 osMotorStop(UNUSED void *pfs) {
|
||||||
controller_rumble_stop();
|
if (configRumbleStrength>0){
|
||||||
|
controller_rumble_stop();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue