HLE: Prevent GetStringVA to strip newlines
This commit is contained in:
parent
9a9b0eed72
commit
1209959012
|
@ -33,6 +33,11 @@ void HLE_OSPanic()
|
|||
std::string error = GetStringVA();
|
||||
std::string msg = GetStringVA(5);
|
||||
|
||||
if (!error.empty() && error.back() == '\n')
|
||||
error.pop_back();
|
||||
if (!msg.empty() && msg.back() == '\n')
|
||||
msg.pop_back();
|
||||
|
||||
PanicAlert("OSPanic: %s: %s", error.c_str(), msg.c_str());
|
||||
ERROR_LOG(OSREPORT, "%08x->%08x| OSPanic: %s: %s", LR, PC, error.c_str(), msg.c_str());
|
||||
|
||||
|
@ -72,6 +77,9 @@ void HLE_GeneralDebugPrint(ParameterType parameter_type)
|
|||
}
|
||||
}
|
||||
|
||||
if (!report_message.empty() && report_message.back() == '\n')
|
||||
report_message.pop_back();
|
||||
|
||||
NPC = LR;
|
||||
|
||||
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, SHIFTJISToUTF8(report_message).c_str());
|
||||
|
@ -108,6 +116,9 @@ void HLE_write_console()
|
|||
ERROR_LOG(OSREPORT, "__write_console uses an unreachable size pointer");
|
||||
}
|
||||
|
||||
if (!report_message.empty() && report_message.back() == '\n')
|
||||
report_message.pop_back();
|
||||
|
||||
NPC = LR;
|
||||
|
||||
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, SHIFTJISToUTF8(report_message).c_str());
|
||||
|
@ -251,9 +262,6 @@ std::string GetStringVA(u32 str_reg, ParameterType parameter_type)
|
|||
}
|
||||
}
|
||||
|
||||
if (!result.empty() && result.back() == '\n')
|
||||
result.pop_back();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue