[colobot] 18/377: Show detailed error info when opening haptic device fails

Didier Raboud odyx at moszumanska.debian.org
Wed Mar 30 13:33:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 7a6e669a37ba0d46b13efc62c095498db31f92c6
Author: krzys-h <krzys_h at interia.pl>
Date:   Sun Sep 27 18:54:02 2015 +0200

    Show detailed error info when opening haptic device fails
---
 src/app/app.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/app/app.cpp b/src/app/app.cpp
index 6186e9b..b83a45f 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -736,13 +736,13 @@ bool CApplication::OpenJoystick()
     m_private->haptic = SDL_HapticOpenFromJoystick(m_private->joystick);
     if (m_private->haptic == nullptr)
     {
-        GetLogger()->Warn("Haptic subsystem open failed\n");
+        GetLogger()->Warn("Haptic subsystem open failed: %s\n", SDL_GetError());
         return true;
     }
 
     if (SDL_HapticRumbleInit(m_private->haptic) != 0)
     {
-        GetLogger()->Warn("Haptic rumble effect init failed\n");
+        GetLogger()->Warn("Haptic rumble effect init failed: %s\n", SDL_GetError());
         return true;
     }
 
@@ -1818,7 +1818,7 @@ void CApplication::PlayForceFeedbackEffect(float strength, int length)
     GetLogger()->Trace("Force feedback! length = %d ms, strength = %.2f\n", length, strength);
     if (SDL_HapticRumblePlay(m_private->haptic, strength, length) != 0)
     {
-        GetLogger()->Debug("Failed to play haptic effect\n");
+        GetLogger()->Debug("Failed to play haptic effect: %s\n", SDL_GetError());
     }
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list