mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 01:17:14 +02:00
cr fixes
This commit is contained in:
parent
ff2405437b
commit
2e71a63574
1 changed files with 8 additions and 3 deletions
|
@ -25,9 +25,12 @@ Joystick::Joystick(SDL_JoystickID instanceId, SDL_GameController* sdlGameControl
|
||||||
_instanceId(instanceId)
|
_instanceId(instanceId)
|
||||||
{
|
{
|
||||||
if (!_sdlHaptic) {
|
if (!_sdlHaptic) {
|
||||||
qDebug() << QString(SDL_GetError());
|
qDebug() << "SDL Haptic Open Failure: " << QString(SDL_GetError());
|
||||||
|
} else {
|
||||||
|
if (SDL_HapticRumbleInit(_sdlHaptic) != 0) {
|
||||||
|
qDebug() << "SDL Haptic Rumble Init Failure: " << QString(SDL_GetError());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
SDL_HapticRumbleInit(_sdlHaptic);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Joystick::~Joystick() {
|
Joystick::~Joystick() {
|
||||||
|
@ -35,7 +38,9 @@ Joystick::~Joystick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Joystick::closeJoystick() {
|
void Joystick::closeJoystick() {
|
||||||
|
if (_sdlHaptic) {
|
||||||
SDL_HapticClose(_sdlHaptic);
|
SDL_HapticClose(_sdlHaptic);
|
||||||
|
}
|
||||||
SDL_GameControllerClose(_sdlGameController);
|
SDL_GameControllerClose(_sdlGameController);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue