Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fix for sceKernelPrintf() function
#1
Before:

Code:
void sceKernelPrintf() { const char *formatString = Memory::GetCharPointer(PARAM(0)); ERROR_LOG(HLE,"UNIMPL sceKernelPrintf(%08x, %08x, %08x, %08x)", PARAM(0),PARAM(1),PARAM(2),PARAM(3)); ERROR_LOG(HLE,"%s", formatString); RETURN(0); }

After:
Code:
void sceKernelPrintf() { const char *formatString = Memory::GetCharPointer(PARAM(0)); DEBUG_LOG(HLE,"IMPL sceKernelPrintf(%08x, %08x, %08x, %08x)", PARAM(0),PARAM(1),PARAM(2),PARAM(3)); if(!Memory::IsValidAddress(PARAM(2)) { DEBUG_LOG(HLE,formatString, &Memory::GetStruct(PARAM(1))); } else { if(!Memory::IsValidAddress(PARAM(3)) { DEBUG_LOG(HLE,formatString, &Memory::GetStruct(PARAM(1)), &Memory::GetStruct(PARAM(2))); } else { DEBUG_LOG(HLE,formatString, &Memory::GetStruct(PARAM(1)), &Memory::GetStruct(PARAM(2)), &Memory::GetStruct(PARAM(3))); } } RETURN(0); }
Reply


Messages In This Thread
Fix for sceKernelPrintf() function - by Denizen - 05-01-2013, 02:35 AM

Forum Jump: