Moved some joystick related messages into log_debug, added help message for manual...
authorIngo Ruhnke <grumbel@gmail.com>
Tue, 12 Aug 2014 08:32:14 +0000 (10:32 +0200)
committerIngo Ruhnke <grumbel@gmail.com>
Tue, 12 Aug 2014 08:32:14 +0000 (10:32 +0200)
src/control/input_manager.cpp
src/control/joystick_manager.cpp
src/supertux/menu/joystick_menu.cpp

index 10b8ba2..6f6ab37 100644 (file)
@@ -1,6 +1,6 @@
 //  SuperTux
 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>,
-//                2007 Ingo Ruhnke <grumbel@gmail.com>
+//           2007,2014 Ingo Ruhnke <grumbel@gmail.com>
 //
 //  This program is free software: you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
 
 #include <iostream>
 
-#include "control/keyboard_manager.hpp"
-#include "control/joystick_manager.hpp"
 #include "control/game_controller_manager.hpp"
+#include "control/joystick_manager.hpp"
+#include "control/keyboard_manager.hpp"
 #include "gui/menu_manager.hpp"
 #include "lisp/list_iterator.hpp"
 #include "supertux/gameconfig.hpp"
 #include "util/gettext.hpp"
+#include "util/log.hpp"
 #include "util/writer.hpp"
 
 InputManager::InputManager() :
@@ -140,17 +141,17 @@ InputManager::process_event(const SDL_Event& event)
       break;
 
     case SDL_CONTROLLERDEVICEADDED:
-      std::cout << "SDL_CONTROLLERDEVICEADDED" << std::endl;
+      log_debug << "SDL_CONTROLLERDEVICEADDED" << std::endl;
       game_controller_manager->on_controller_added(event.cdevice.which);
       break;
 
     case SDL_CONTROLLERDEVICEREMOVED:
-      std::cout << "SDL_CONTROLLERDEVICEREMOVED" << std::endl;
+      log_debug << "SDL_CONTROLLERDEVICEREMOVED" << std::endl;
       game_controller_manager->on_controller_removed(event.cdevice.which);
       break;
 
     case SDL_CONTROLLERDEVICEREMAPPED:
-      std::cout << "SDL_CONTROLLERDEVICEREMAPPED" << std::endl;
+      log_debug << "SDL_CONTROLLERDEVICEREMAPPED" << std::endl;
       break;
 
     default:
index 423cb1c..f6fbbe4 100644 (file)
@@ -1,5 +1,5 @@
 //  SuperTux
-//  Copyright (C) 2013 Ingo Ruhnke <grumbel@gmail.com>
+//  Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com>
 //
 //  This program is free software: you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
@@ -81,7 +81,7 @@ JoystickManager::~JoystickManager()
 void
 JoystickManager::on_joystick_added(int joystick_index)
 {
-  std::cout << "joydeviceadded: " << joystick_index << std::endl;
+  log_debug << "on_joystick_added(): " << joystick_index << std::endl;
   SDL_Joystick* joystick = SDL_JoystickOpen(joystick_index);
   if (!joystick)
   {
@@ -109,7 +109,7 @@ JoystickManager::on_joystick_added(int joystick_index)
 void
 JoystickManager::on_joystick_removed(int instance_id)
 {
-  std::cout << "joydeviceremoved: " << static_cast<int>(instance_id) << std::endl;
+  log_debug << "on_joystick_removed: " << static_cast<int>(instance_id) << std::endl;
   for(auto& joy : joysticks)
   {
     SDL_JoystickID id = SDL_JoystickInstanceID(joy);
index ca32948..352e83b 100644 (file)
@@ -1,6 +1,6 @@
 //  SuperTux
 //  Copyright (C) 2006 Matthias Braun <matze@braunis.de>,
-//                2007 Ingo Ruhnke <grumbel@gmail.com>
+//           2007,2014 Ingo Ruhnke <grumbel@gmail.com>
 //
 //  This program is free software: you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
@@ -49,8 +49,9 @@ JoystickMenu::recreate_menu()
   add_label(_("Setup Joystick"));
   add_hl();
 
-  add_toggle(MNID_AUTO_JOYSTICK_CFG, _("Manual Joystick Configuration"),
-             !m_input_manager->use_game_controller());
+  add_toggle(MNID_AUTO_JOYSTICK_CFG, _("Manual Configuration"),
+             !m_input_manager->use_game_controller())
+    ->set_help(_("Use manual configuration instead of SDL2's automatic GameController support"));
 
   if (m_input_manager->use_game_controller())
   {