Removed irrlicht debug output (only non-trivial messages are printed

to stdout now).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3464 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2009-05-04 12:25:00 +00:00
parent 9316d3ed28
commit 092183844f
3 changed files with 18 additions and 5 deletions

View File

@@ -46,10 +46,10 @@ namespace GUIEngine
{
if(g_current_screen == NULL) return false;
g_current_screen->OnEvent(event);
return false;
}
else
input_manager->input(event);
return false;
return input_manager->input(event);
}
};
IrrlichtEventCore* g_irrlicht_event_core = NULL;

View File

@@ -280,7 +280,7 @@ void InputManager::input(Input::InputType type, int id0, int id1, int id2,
* flexibility (= treat 4 directions as four buttons).
*
*/
void InputManager::input(const SEvent& event)
bool InputManager::input(const SEvent& event)
{
if(event.EventType == EET_JOYSTICK_INPUT_EVENT)
@@ -315,6 +315,16 @@ void InputManager::input(const SEvent& event)
}
}
else if(event.EventType == EET_LOG_TEXT_EVENT)
{
// Ignore 'normal' messages
if(event.LogEvent.Level>0)
{
printf("Level %d: %s\n",
event.LogEvent.Level,event.LogEvent.Text);
}
return true;
}
else if(event.EventType == EET_KEY_INPUT_EVENT)
{
const int key = event.KeyInput.Key;
@@ -325,7 +335,7 @@ void InputManager::input(const SEvent& event)
if(key == KEY_ESCAPE)
{
StateManager::escapePressed();
return;
return true;
}
input(Input::IT_KEYBOARD, key,
@@ -374,6 +384,9 @@ void InputManager::input(const SEvent& event)
*/
}
#endif
// FIXME: to restore the original behaviour (engine returns false in the
// case the input_manager::input is called)
return false;
}
//-----------------------------------------------------------------------------

View File

@@ -75,7 +75,7 @@ public:
// void initGamePadDevices();
//void input();
void input(const irr::SEvent& event);
bool input(const irr::SEvent& event);
DeviceManager* getDeviceList() { return m_device_manager; }