mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Correctly output NULs, etc. (i.e. UTF-16.)
This commit is contained in:
parent
b17b120104
commit
3decbba334
3 changed files with 5 additions and 5 deletions
|
@ -1184,9 +1184,9 @@ u32 sceIoDevctl(const char *name, int cmd, u32 argAddr, int argLen, u32 outPtr,
|
|||
case 2: // EMULATOR_DEVCTL__SEND_OUTPUT
|
||||
{
|
||||
std::string data(Memory::GetCharPointer(argAddr), argLen);
|
||||
if (PSP_CoreParameter().printfEmuLog) {
|
||||
host->SendDebugOutput(data.c_str());
|
||||
} else {
|
||||
if (PSP_CoreParameter().printfEmuLog) {
|
||||
host->SendDebugOutput(data);
|
||||
} else {
|
||||
if (PSP_CoreParameter().collectEmuLog) {
|
||||
*PSP_CoreParameter().collectEmuLog += data;
|
||||
} else {
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
virtual bool IsDebuggingEnabled() {return false;}
|
||||
virtual bool AttemptLoadSymbolMap() {return false;}
|
||||
|
||||
virtual void SendDebugOutput(const std::string &output) { printf("%s", output.c_str()); }
|
||||
virtual void SendDebugOutput(const std::string &output) { fwrite(output.data(), sizeof(char), output.length(), stdout); }
|
||||
virtual void SetComparisonScreenshot(const std::string &filename) {}
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ void WindowsHeadlessHost::LoadNativeAssets()
|
|||
|
||||
void WindowsHeadlessHost::SendDebugOutput(const std::string &output)
|
||||
{
|
||||
fprintf_s(out, "%s", output.c_str());
|
||||
fwrite(output.data(), sizeof(char), output.length(), out);
|
||||
OutputDebugString(output.c_str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue