Floating point printf parsing by jeffjohnson0. Solves issue 302.
Thanks jeffjohnson0. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1231 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
601f65f071
commit
f5a92e2e9e
|
@ -76,6 +76,7 @@ void GetStringVA(std::string& _rOutBuffer)
|
|||
_rOutBuffer = "";
|
||||
char ArgumentBuffer[256];
|
||||
u32 ParameterCounter = 4;
|
||||
u32 FloatingParameterCounter = 1;
|
||||
char* pString = (char*)Memory::GetPointer(GPR(3));
|
||||
if (!pString) {
|
||||
//PanicAlert("Invalid GetStringVA call");
|
||||
|
@ -110,15 +111,24 @@ void GetStringVA(std::string& _rOutBuffer)
|
|||
_rOutBuffer += StringFromFormat(ArgumentBuffer, (char*)Memory::GetPointer(Parameter));
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case 'd':
|
||||
case 'i':
|
||||
{
|
||||
//u64 Double = Memory::Read_U64(Parameter);
|
||||
_rOutBuffer += StringFromFormat(ArgumentBuffer, Parameter);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
//TODO: fix floating-point (%f)
|
||||
|
||||
case 'f':
|
||||
{
|
||||
_rOutBuffer += StringFromFormat(ArgumentBuffer,
|
||||
rPS0(FloatingParameterCounter));
|
||||
FloatingParameterCounter++;
|
||||
ParameterCounter--;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
_rOutBuffer += StringFromFormat(ArgumentBuffer, Parameter);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue