little fix to __write_console logging, the char* is in r4, not r3, heh
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4466 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
227d363881
commit
04a0e630db
|
@ -64,7 +64,7 @@ static const SPatch OSPatches[] =
|
|||
{ "printf", HLE_OS::HLE_GeneralDebugPrint },
|
||||
{ "puts", HLE_OS::HLE_GeneralDebugPrint }, // gcc-optimized printf?
|
||||
{ "___blank(char *,...)", HLE_OS::HLE_GeneralDebugPrint }, // dunno, but awesome :D
|
||||
{ "__write_console", HLE_OS::HLE_GeneralDebugPrint }, // used by sysmenu (+more?)
|
||||
{ "__write_console", HLE_OS::HLE_write_console }, // used by sysmenu (+more?)
|
||||
|
||||
// wii only
|
||||
{ "__OSInitAudioSystem", HLE_Misc::UnimplementedFunction },
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
namespace HLE_OS
|
||||
{
|
||||
|
||||
void GetStringVA(std::string& _rOutBuffer);
|
||||
void GetStringVA(std::string& _rOutBuffer, u32 strReg = 3);
|
||||
|
||||
void HLE_OSPanic()
|
||||
{
|
||||
|
@ -51,13 +51,24 @@ void HLE_GeneralDebugPrint()
|
|||
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, ReportMessage.c_str());
|
||||
}
|
||||
|
||||
void GetStringVA(std::string& _rOutBuffer)
|
||||
// __write_console is slightly abnormal
|
||||
void HLE_write_console()
|
||||
{
|
||||
std::string ReportMessage;
|
||||
GetStringVA(ReportMessage, 4);
|
||||
NPC = LR;
|
||||
|
||||
//PanicAlert("(%08x->%08x) %s", LR, PC, ReportMessage.c_str());
|
||||
NOTICE_LOG(OSREPORT, "%08x->%08x| %s", LR, PC, ReportMessage.c_str());
|
||||
}
|
||||
|
||||
void GetStringVA(std::string& _rOutBuffer, u32 strReg)
|
||||
{
|
||||
_rOutBuffer = "";
|
||||
char ArgumentBuffer[256];
|
||||
u32 ParameterCounter = 4;
|
||||
u32 FloatingParameterCounter = 1;
|
||||
char* pString = (char*)Memory::GetPointer(GPR(3));
|
||||
char* pString = (char*)Memory::GetPointer(GPR(strReg));
|
||||
if (!pString) {
|
||||
//PanicAlert("Invalid GetStringVA call");
|
||||
return;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
namespace HLE_OS
|
||||
{
|
||||
void HLE_GeneralDebugPrint();
|
||||
void HLE_write_console();
|
||||
void HLE_OSPanic();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue