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. */
|
/** If gamepad debugging is enabled. */
|
||||||
PARAM_PREFIX bool m_gamepad_debug PARAM_DEFAULT( false );
|
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. */
|
/** Wiimote debugging. */
|
||||||
PARAM_PREFIX bool m_wiimote_debug PARAM_DEFAULT( false );
|
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);
|
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
|
// FIXME? it may be a bit unclean that all input events go trough
|
||||||
// the gui module
|
// the gui module
|
||||||
const EventPropagation blockPropagation = input_manager->input(event);
|
const EventPropagation blockPropagation = input_manager->input(event);
|
||||||
|
@ -659,6 +659,8 @@ int handleCmdLine()
|
|||||||
|
|
||||||
if(CommandLine::has("--gamepad-debug"))
|
if(CommandLine::has("--gamepad-debug"))
|
||||||
UserConfigParams::m_gamepad_debug=true;
|
UserConfigParams::m_gamepad_debug=true;
|
||||||
|
if (CommandLine::has("--keyboard-debug"))
|
||||||
|
UserConfigParams::m_keyboard_debug = true;
|
||||||
if (CommandLine::has("--wiimote-debug"))
|
if (CommandLine::has("--wiimote-debug"))
|
||||||
UserConfigParams::m_wiimote_debug = true;
|
UserConfigParams::m_wiimote_debug = true;
|
||||||
if(CommandLine::has("--tutorial-debug"))
|
if(CommandLine::has("--tutorial-debug"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user