File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,18 @@ class MyEventReceiver : public IEventReceiver
85
85
mouse_wheel += event.MouseInput .Wheel ;
86
86
}
87
87
}
88
- }
89
- if (event.EventType == irr::EET_LOG_TEXT_EVENT) {
90
- dstream << std::string (" Irrlicht log: " ) + std::string (event.LogEvent .Text )
91
- << std::endl;
88
+ } else if (event.EventType == irr::EET_LOG_TEXT_EVENT) {
89
+ static const enum LogMessageLevel irr_loglev_conv[] = {
90
+ LMT_VERBOSE, // ELL_DEBUG
91
+ LMT_INFO, // ELL_INFORMATION
92
+ LMT_ACTION, // ELL_WARNING
93
+ LMT_ERROR, // ELL_ERROR
94
+ LMT_ERROR, // ELL_NONE
Has conversations. Original line has conversations.
95
+ };
96
+ assert (event.LogEvent .Level < sizeof (irr_loglev_conv));
97
+ log_printline (irr_loglev_conv[event.LogEvent .Level ],
98
+ std::string (" Irrlicht: " )
99
+ + (const char *) event.LogEvent .Text );
92
100
return true ;
93
101
}
94
102
/* always return false in order to continue processing events */
You can’t perform that action at this time.