mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
Rumble indefinitely until turned off
This commit is contained in:
parent
fe6dbd2a5b
commit
24f504ef9b
1 changed files with 6 additions and 1 deletions
|
@ -93,6 +93,9 @@ namespace Ship {
|
|||
}
|
||||
|
||||
bool SDLController::Close() {
|
||||
if (SDL_GameControllerHasRumble(Cont)) {
|
||||
SDL_GameControllerRumble(Cont, 0, 0, 0);
|
||||
}
|
||||
if (Cont != nullptr) {
|
||||
SDL_GameControllerClose(Cont);
|
||||
}
|
||||
|
@ -331,7 +334,9 @@ namespace Ship {
|
|||
{
|
||||
if (SDL_GameControllerHasRumble(Cont)) {
|
||||
if (controller->rumble > 0) {
|
||||
SDL_GameControllerRumble(Cont, 0xFFFF * Game::Settings.controller.rumble_strength, 0xFFFF * Game::Settings.controller.rumble_strength, 1);
|
||||
SDL_GameControllerRumble(Cont, 0xFFFF * Game::Settings.controller.rumble_strength, 0xFFFF * Game::Settings.controller.rumble_strength, 0);
|
||||
} else {
|
||||
SDL_GameControllerRumble(Cont, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue