mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
more debugging output
This commit is contained in:
parent
fdf7e8490d
commit
04590b6432
@ -5,6 +5,7 @@
|
||||
|
||||
#include "eventHandler.h"
|
||||
#include "eventQueue.h"
|
||||
#include "config_event.h"
|
||||
|
||||
TypeHandle EventHandler::_type_handle;
|
||||
|
||||
@ -52,6 +53,10 @@ dispatch_event(const CPT_Event &event) {
|
||||
|
||||
Functions::const_iterator fi;
|
||||
for (fi = functions.begin(); fi != functions.end(); ++fi) {
|
||||
if (event_cat->is_spam())
|
||||
event_cat->spam() << "calling callback 0x" << (void*)(*fi)
|
||||
<< " for event '" << event->get_name() << "'"
|
||||
<< endl;
|
||||
(*fi)(event);
|
||||
}
|
||||
}
|
||||
@ -84,6 +89,9 @@ dispatch_event(const CPT_Event &event) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
bool EventHandler::
|
||||
add_hook(const string &event_name, EventFunction *function) {
|
||||
if (event_cat->is_debug())
|
||||
event_cat->debug() << "adding hook for event '" << event_name
|
||||
<< "' with function 0x" << (void*)function << endl;
|
||||
return _hooks[event_name].insert(function).second;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user