Better implementation of RtlAssert

This commit is contained in:
Luke Usher 2019-11-09 23:05:46 +00:00
parent 6b08ee81cc
commit 829177f57a
1 changed files with 9 additions and 4 deletions

View File

@ -235,10 +235,15 @@ XBSYSAPI EXPORTNUM(264) xboxkrnl::VOID NTAPI xboxkrnl::RtlAssert
LOG_FUNC_ARG(Message)
LOG_FUNC_END;
//printf("Assertion Failed: %s %s:%d %s\n", FailedAssertion, FileName, LineNumber, Message);
//CxbxPopupMessage(LOG_LEVEL::WARNING, CxbxMsgDlgIcon_Warn, "RtlAssert() raised by emulated program - consult Debug log");
std::stringstream ss;
ss << "RtlAssert() raised by emulated program\n" << FileName << ":" << LineNumber << ":" << FailedAssertion ;
if (Message) {
ss << " " << Message;
}
ss << ")";
CxbxPopupMessage(LOG_LEVEL::WARNING, CxbxMsgDlgIcon_Warn, ss.str().c_str());
}
// ******************************************************************