Added command line option for keyboard debugging.
This commit is contained in:
parent
474012c442
commit
1eb51db5ea
@ -478,6 +478,9 @@ namespace UserConfigParams
|
||||
/** If gamepad debugging is enabled. */
|
||||
PARAM_PREFIX bool m_gamepad_debug PARAM_DEFAULT( false );
|
||||
|
||||
/** If gamepad debugging is enabled. */
|
||||
PARAM_PREFIX bool m_keyboard_debug PARAM_DEFAULT(false);
|
||||
|
||||
/** Wiimote debugging. */
|
||||
PARAM_PREFIX bool m_wiimote_debug PARAM_DEFAULT( false );
|
||||
|
||||
|
@ -181,6 +181,13 @@ bool EventHandler::OnEvent (const SEvent &event)
|
||||
World::getWorld()->onMouseClick(event.MouseInput.X, event.MouseInput.Y);
|
||||
}
|
||||
|
||||
if (UserConfigParams::m_keyboard_debug)
|
||||
{
|
||||
Log::verbose("keyboard", "char %d key %d ctrl %d down %d shift %d",
|
||||
event.KeyInput.Char, event.KeyInput.Key,
|
||||
event.KeyInput.Control, event.KeyInput.PressedDown,
|
||||
event.KeyInput.Shift);
|
||||
}
|
||||
// FIXME? it may be a bit unclean that all input events go trough
|
||||
// the gui module
|
||||
const EventPropagation blockPropagation = input_manager->input(event);
|
||||
|
@ -659,7 +659,9 @@ int handleCmdLine()
|
||||
|
||||
if(CommandLine::has("--gamepad-debug"))
|
||||
UserConfigParams::m_gamepad_debug=true;
|
||||
if(CommandLine::has("--wiimote-debug"))
|
||||
if (CommandLine::has("--keyboard-debug"))
|
||||
UserConfigParams::m_keyboard_debug = true;
|
||||
if (CommandLine::has("--wiimote-debug"))
|
||||
UserConfigParams::m_wiimote_debug = true;
|
||||
if(CommandLine::has("--tutorial-debug"))
|
||||
UserConfigParams::m_tutorial_debug = true;
|
||||
|
Loading…
Reference in New Issue
Block a user