mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-11-14 01:58:43 +01:00
RMG-Core: print callbacks even when callbacks haven't been setup
This commit is contained in:
1 parent
b166eac200
commit
2a7d8aa4d2
1 file changed
+8
-8
@@ -28,14 +28,19 @@ static bool l_PrintCallbacks = false;
|
||||
|
||||
void CoreDebugCallback(void* context, int level, const char* message)
|
||||
{
|
||||
std::string contextString((const char*)context);
|
||||
std::string messageString(message);
|
||||
|
||||
if (l_PrintCallbacks)
|
||||
{
|
||||
std::cout << contextString << messageString << std::endl;
|
||||
}
|
||||
|
||||
if (!l_SetupCallbacks)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::string contextString((const char*)context);
|
||||
std::string messageString(message);
|
||||
|
||||
// convert string encoding accordingly
|
||||
if (messageString.starts_with("IS64:"))
|
||||
{
|
||||
@@ -46,11 +51,6 @@ void CoreDebugCallback(void* context, int level, const char* message)
|
||||
messageString = CoreConvertStringEncoding(message, CoreStringEncoding::Shift_JIS);
|
||||
}
|
||||
|
||||
if (l_PrintCallbacks)
|
||||
{
|
||||
std::cout << contextString << messageString << std::endl;
|
||||
}
|
||||
|
||||
l_DebugCallbackFunc((CoreDebugMessageType)level, contextString, messageString);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user