diff --git a/rpcs3.sln b/rpcs3.sln index 65d6266b30..ed60da0b4f 100644 --- a/rpcs3.sln +++ b/rpcs3.sln @@ -1,5 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 2013 +VisualStudioVersion = 12.0.30110.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}" ProjectSection(ProjectDependencies) = postProject {3111D679-7796-23C4-BA0C-271F1145DA24} = {3111D679-7796-23C4-BA0C-271F1145DA24} diff --git a/rpcs3/Emu/CPU/CPUThread.cpp b/rpcs3/Emu/CPU/CPUThread.cpp index df0320a54a..610c5bbdcd 100644 --- a/rpcs3/Emu/CPU/CPUThread.cpp +++ b/rpcs3/Emu/CPU/CPUThread.cpp @@ -142,7 +142,7 @@ void CPUThread::SetBranch(const u64 pc, bool record_branch) { if(!Memory.IsGoodAddr(m_offset + pc)) { - ConLog.Error("%s branch error: bad address 0x%llx #pc: 0x%llx", GetFName().mb_str(), m_offset + pc, m_offset + PC); + ConLog.Error("%s branch error: bad address 0x%llx #pc: 0x%llx", GetFName().wx_str(), m_offset + pc, m_offset + PC); Emu.Pause(); } @@ -345,7 +345,7 @@ void CPUThread::Task() } catch(const wxString& e) { - ConLog.Error("Exception: %s", e.mb_str()); + ConLog.Error("Exception: %s", e.wx_str()); } catch(const char* e) { diff --git a/rpcs3/Emu/CPU/CPUThreadManager.cpp b/rpcs3/Emu/CPU/CPUThreadManager.cpp index 0a2ad13f33..389d6d894b 100644 --- a/rpcs3/Emu/CPU/CPUThreadManager.cpp +++ b/rpcs3/Emu/CPU/CPUThreadManager.cpp @@ -36,7 +36,7 @@ CPUThread& CPUThreadManager::AddThread(CPUThreadType type) default: assert(0); } - new_thread->SetId(Emu.GetIdManager().GetNewID((const char*)wxString::Format("%s Thread", (const char*)new_thread->GetTypeString().mb_str()).mb_str(), new_thread)); + new_thread->SetId(Emu.GetIdManager().GetNewID(wxString::Format("%s Thread", new_thread->GetTypeString().wx_str()).ToStdString(), new_thread)); m_threads.Add(new_thread); #ifndef QT_UI diff --git a/rpcs3/Emu/Cell/PPCDisAsm.h b/rpcs3/Emu/Cell/PPCDisAsm.h index 006feb738a..55513c0d0c 100644 --- a/rpcs3/Emu/Cell/PPCDisAsm.h +++ b/rpcs3/Emu/Cell/PPCDisAsm.h @@ -15,39 +15,39 @@ protected: void DisAsm_V4(const wxString& op, u32 v0, u32 v1, u32 v2, u32 v3) { - Write(wxString::Format("%s v%d,v%d,v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1, v2, v3)); + Write(wxString::Format("%s v%d,v%d,v%d,v%d", FixOp(op).wx_str(), v0, v1, v2, v3)); } void DisAsm_V3_UIMM(const wxString& op, u32 v0, u32 v1, u32 v2, u32 uimm) { - Write(wxString::Format("%s v%d,v%d,v%d,%u #%x", (const char*)FixOp(op).mb_str(), v0, v1, v2, uimm, uimm)); + Write(wxString::Format("%s v%d,v%d,v%d,%u #%x", FixOp(op).wx_str(), v0, v1, v2, uimm, uimm)); } void DisAsm_V3(const wxString& op, u32 v0, u32 v1, u32 v2) { - Write(wxString::Format("%s v%d,v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1, v2)); + Write(wxString::Format("%s v%d,v%d,v%d", FixOp(op).wx_str(), v0, v1, v2)); } void DisAsm_V2_UIMM(const wxString& op, u32 v0, u32 v1, u32 uimm) { - Write(wxString::Format("%s v%d,v%d,%u #%x", (const char*)FixOp(op).mb_str(), v0, v1, uimm, uimm)); + Write(wxString::Format("%s v%d,v%d,%u #%x", FixOp(op).wx_str(), v0, v1, uimm, uimm)); } void DisAsm_V2(const wxString& op, u32 v0, u32 v1) { - Write(wxString::Format("%s v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1)); + Write(wxString::Format("%s v%d,v%d", FixOp(op).wx_str(), v0, v1)); } void DisAsm_V1_SIMM(const wxString& op, u32 v0, s32 simm) { - Write(wxString::Format("%s v%d,%d #%x", (const char*)FixOp(op).mb_str(), v0, simm, simm)); + Write(wxString::Format("%s v%d,%d #%x", FixOp(op).wx_str(), v0, simm, simm)); } void DisAsm_V1(const wxString& op, u32 v0) { - Write(wxString::Format("%s v%d", (const char*)FixOp(op).mb_str(), v0)); + Write(wxString::Format("%s v%d", FixOp(op).wx_str(), v0)); } void DisAsm_V1_R2(const wxString& op, u32 v0, u32 r1, u32 r2) { - Write(wxString::Format("%s v%d,r%d,r%d", (const char*)FixOp(op).mb_str(), v0, r1, r2)); + Write(wxString::Format("%s v%d,r%d,r%d", FixOp(op).wx_str(), v0, r1, r2)); } void DisAsm_CR1_F2_RC(const wxString& op, u32 cr0, u32 f0, u32 f1, bool rc) { - Write(wxString::Format("%s%s cr%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", cr0, f0, f1)); + Write(wxString::Format("%s%s cr%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", cr0, f0, f1)); } void DisAsm_CR1_F2(const wxString& op, u32 cr0, u32 f0, u32 f1) { @@ -55,15 +55,15 @@ protected: } void DisAsm_INT1_R2(const wxString& op, u32 i0, u32 r0, u32 r1) { - Write(wxString::Format("%s %d,r%d,r%d", (const char*)FixOp(op).mb_str(), i0, r0, r1)); + Write(wxString::Format("%s %d,r%d,r%d", FixOp(op).wx_str(), i0, r0, r1)); } void DisAsm_INT1_R1_IMM(const wxString& op, u32 i0, u32 r0, s32 imm0) { - Write(wxString::Format("%s %d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), i0, r0, imm0, imm0)); + Write(wxString::Format("%s %d,r%d,%d #%x", FixOp(op).wx_str(), i0, r0, imm0, imm0)); } void DisAsm_INT1_R1_RC(const wxString& op, u32 i0, u32 r0, bool rc) { - Write(wxString::Format("%s%s %d,r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", i0, r0)); + Write(wxString::Format("%s%s %d,r%d", FixOp(op).wx_str(), rc ? "." : "", i0, r0)); } void DisAsm_INT1_R1(const wxString& op, u32 i0, u32 r0) { @@ -71,11 +71,11 @@ protected: } void DisAsm_F4_RC(const wxString& op, u32 f0, u32 f1, u32 f2, u32 f3, bool rc) { - Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1, f2, f3)); + Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2, f3)); } void DisAsm_F3_RC(const wxString& op, u32 f0, u32 f1, u32 f2, bool rc) { - Write(wxString::Format("%s%s f%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1, f2)); + Write(wxString::Format("%s%s f%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2)); } void DisAsm_F3(const wxString& op, u32 f0, u32 f1, u32 f2) { @@ -83,7 +83,7 @@ protected: } void DisAsm_F2_RC(const wxString& op, u32 f0, u32 f1, bool rc) { - Write(wxString::Format("%s%s f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1)); + Write(wxString::Format("%s%s f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1)); } void DisAsm_F2(const wxString& op, u32 f0, u32 f1) { @@ -93,21 +93,21 @@ protected: { if(m_mode == CPUDisAsm_CompilerElfMode) { - Write(wxString::Format("%s f%d,r%d,r%d", (const char*)FixOp(op).mb_str(), f0, r0, r1)); + Write(wxString::Format("%s f%d,r%d,r%d", FixOp(op).wx_str(), f0, r0, r1)); return; } - Write(wxString::Format("%s f%d,r%d(r%d)", (const char*)FixOp(op).mb_str(), f0, r0, r1)); + Write(wxString::Format("%s f%d,r%d(r%d)", FixOp(op).wx_str(), f0, r0, r1)); } void DisAsm_F1_IMM_R1_RC(const wxString& op, u32 f0, s32 imm0, u32 r0, bool rc) { if(m_mode == CPUDisAsm_CompilerElfMode) { - Write(wxString::Format("%s%s f%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, r0, imm0, imm0)); + Write(wxString::Format("%s%s f%d,r%d,%d #%x", FixOp(op).wx_str(), rc ? "." : "", f0, r0, imm0, imm0)); return; } - Write(wxString::Format("%s%s f%d,%d(r%d) #%x", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, imm0, r0, imm0)); + Write(wxString::Format("%s%s f%d,%d(r%d) #%x", FixOp(op).wx_str(), rc ? "." : "", f0, imm0, r0, imm0)); } void DisAsm_F1_IMM_R1(const wxString& op, u32 f0, s32 imm0, u32 r0) { @@ -115,11 +115,11 @@ protected: } void DisAsm_F1_RC(const wxString& op, u32 f0, bool rc) { - Write(wxString::Format("%s%s f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0)); + Write(wxString::Format("%s%s f%d", FixOp(op).wx_str(), rc ? "." : "", f0)); } void DisAsm_R1_RC(const wxString& op, u32 r0, bool rc) { - Write(wxString::Format("%s%s r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0)); + Write(wxString::Format("%s%s r%d", FixOp(op).wx_str(), rc ? "." : "", r0)); } void DisAsm_R1(const wxString& op, u32 r0) { @@ -127,7 +127,7 @@ protected: } void DisAsm_R2_OE_RC(const wxString& op, u32 r0, u32 r1, u32 oe, bool rc) { - Write(wxString::Format("%s%s%s r%d,r%d", (const char*)FixOp(op).mb_str(), oe ? "o" : "", rc ? "." : "", r0, r1)); + Write(wxString::Format("%s%s%s r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1)); } void DisAsm_R2_RC(const wxString& op, u32 r0, u32 r1, bool rc) { @@ -139,11 +139,11 @@ protected: } void DisAsm_R3_OE_RC(const wxString& op, u32 r0, u32 r1, u32 r2, u32 oe, bool rc) { - Write(wxString::Format("%s%s%s r%d,r%d,r%d", (const char*)FixOp(op).mb_str(), oe ? "o" : "", rc ? "." : "", r0, r1, r2)); + Write(wxString::Format("%s%s%s r%d,r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1, r2)); } void DisAsm_R3_INT2_RC(const wxString& op, u32 r0, u32 r1, u32 r2, s32 i0, s32 i1, bool rc) { - Write(wxString::Format("%s%s r%d,r%d,r%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, r2, i0, i1)); + Write(wxString::Format("%s%s r%d,r%d,r%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, r2, i0, i1)); } void DisAsm_R3_RC(const wxString& op, u32 r0, u32 r1, u32 r2, bool rc) { @@ -155,7 +155,7 @@ protected: } void DisAsm_R2_INT3_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2, bool rc) { - Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0, i1, i2)); + Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1, i2)); } void DisAsm_R2_INT3(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2) { @@ -163,7 +163,7 @@ protected: } void DisAsm_R2_INT2_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, bool rc) { - Write(wxString::Format("%s%s r%d,r%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0, i1)); + Write(wxString::Format("%s%s r%d,r%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1)); } void DisAsm_R2_INT2(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1) { @@ -171,7 +171,7 @@ protected: } void DisAsm_R2_INT1_RC(const wxString& op, u32 r0, u32 r1, s32 i0, bool rc) { - Write(wxString::Format("%s%s r%d,r%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0)); + Write(wxString::Format("%s%s r%d,r%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0)); } void DisAsm_R2_INT1(const wxString& op, u32 r0, u32 r1, s32 i0) { @@ -181,27 +181,27 @@ protected: { if(m_mode == CPUDisAsm_CompilerElfMode) { - Write(wxString::Format("%s r%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), r0, r1, imm0, imm0)); + Write(wxString::Format("%s r%d,r%d,%d #%x", FixOp(op).wx_str(), r0, r1, imm0, imm0)); return; } - Write(wxString::Format("%s r%d,%d(r%d) #%x", (const char*)FixOp(op).mb_str(), r0, imm0, r1, imm0)); + Write(wxString::Format("%s r%d,%d(r%d) #%x", FixOp(op).wx_str(), r0, imm0, r1, imm0)); } void DisAsm_R1_IMM(const wxString& op, u32 r0, s32 imm0) { - Write(wxString::Format("%s r%d,%d #%x", (const char*)FixOp(op).mb_str(), r0, imm0, imm0)); + Write(wxString::Format("%s r%d,%d #%x", FixOp(op).wx_str(), r0, imm0, imm0)); } void DisAsm_IMM_R1(const wxString& op, s32 imm0, u32 r0) { - Write(wxString::Format("%s %d,r%d #%x", (const char*)FixOp(op).mb_str(), imm0, r0, imm0)); + Write(wxString::Format("%s %d,r%d #%x", FixOp(op).wx_str(), imm0, r0, imm0)); } void DisAsm_CR1_R1_IMM(const wxString& op, u32 cr0, u32 r0, s32 imm0) { - Write(wxString::Format("%s cr%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), cr0, r0, imm0, imm0)); + Write(wxString::Format("%s cr%d,r%d,%d #%x", FixOp(op).wx_str(), cr0, r0, imm0, imm0)); } void DisAsm_CR1_R2_RC(const wxString& op, u32 cr0, u32 r0, u32 r1, bool rc) { - Write(wxString::Format("%s%s cr%d,r%d,r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", cr0, r0, r1)); + Write(wxString::Format("%s%s cr%d,r%d,r%d", FixOp(op).wx_str(), rc ? "." : "", cr0, r0, r1)); } void DisAsm_CR1_R2(const wxString& op, u32 cr0, u32 r0, u32 r1) { @@ -209,30 +209,30 @@ protected: } void DisAsm_CR2(const wxString& op, u32 cr0, u32 cr1) { - Write(wxString::Format("%s cr%d,cr%d", (const char*)FixOp(op).mb_str(), cr0, cr1)); + Write(wxString::Format("%s cr%d,cr%d", FixOp(op).wx_str(), cr0, cr1)); } void DisAsm_INT3(const wxString& op, const int i0, const int i1, const int i2) { - Write(wxString::Format("%s %d,%d,%d", (const char*)FixOp(op).mb_str(), i0, i1, i2)); + Write(wxString::Format("%s %d,%d,%d", FixOp(op).wx_str(), i0, i1, i2)); } void DisAsm_INT1(const wxString& op, const int i0) { - Write(wxString::Format("%s %d", (const char*)FixOp(op).mb_str(), i0)); + Write(wxString::Format("%s %d", FixOp(op).wx_str(), i0)); } void DisAsm_BRANCH(const wxString& op, const int pc) { - Write(wxString::Format("%s 0x%x", (const char*)FixOp(op).mb_str(), DisAsmBranchTarget(pc))); + Write(wxString::Format("%s 0x%x", FixOp(op).wx_str(), DisAsmBranchTarget(pc))); } void DisAsm_BRANCH_A(const wxString& op, const int pc) { - Write(wxString::Format("%s 0x%x", (const char*)FixOp(op).mb_str(), pc)); + Write(wxString::Format("%s 0x%x", FixOp(op).wx_str(), pc)); } void DisAsm_B2_BRANCH(const wxString& op, u32 b0, u32 b1, const int pc) { - Write(wxString::Format("%s %d,%d,0x%x ", (const char*)FixOp(op).mb_str(), b0, b1, DisAsmBranchTarget(pc))); + Write(wxString::Format("%s %d,%d,0x%x ", FixOp(op).wx_str(), b0, b1, DisAsmBranchTarget(pc))); } void DisAsm_CR_BRANCH(const wxString& op, u32 cr, const int pc) { - Write(wxString::Format("%s cr%d,0x%x ", (const char*)FixOp(op).mb_str(), cr, DisAsmBranchTarget(pc))); + Write(wxString::Format("%s cr%d,0x%x ", FixOp(op).wx_str(), cr, DisAsmBranchTarget(pc))); } }; diff --git a/rpcs3/Emu/Cell/PPCThread.h b/rpcs3/Emu/Cell/PPCThread.h index cb8ec7da41..b95f8e7c94 100644 --- a/rpcs3/Emu/Cell/PPCThread.h +++ b/rpcs3/Emu/Cell/PPCThread.h @@ -17,7 +17,7 @@ public: virtual std::string GetThreadName() const { - return std::string((GetFName() + wxString::Format("[0x%08llx]", PC)).mb_str()); + return (GetFName() + wxString::Format("[0x%08llx]", PC)).ToStdString(); } protected: diff --git a/rpcs3/Emu/Cell/PPUDisAsm.h b/rpcs3/Emu/Cell/PPUDisAsm.h index 16b29d474d..68b329734a 100644 --- a/rpcs3/Emu/Cell/PPUDisAsm.h +++ b/rpcs3/Emu/Cell/PPUDisAsm.h @@ -24,39 +24,39 @@ private: private: void DisAsm_V4(const wxString& op, u32 v0, u32 v1, u32 v2, u32 v3) { - Write(wxString::Format("%s v%d,v%d,v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1, v2, v3)); + Write(wxString::Format("%s v%d,v%d,v%d,v%d", FixOp(op).wx_str(), v0, v1, v2, v3)); } void DisAsm_V3_UIMM(const wxString& op, u32 v0, u32 v1, u32 v2, u32 uimm) { - Write(wxString::Format("%s v%d,v%d,v%d,%u #%x", (const char*)FixOp(op).mb_str(), v0, v1, v2, uimm, uimm)); + Write(wxString::Format("%s v%d,v%d,v%d,%u #%x", FixOp(op).wx_str(), v0, v1, v2, uimm, uimm)); } void DisAsm_V3(const wxString& op, u32 v0, u32 v1, u32 v2) { - Write(wxString::Format("%s v%d,v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1, v2)); + Write(wxString::Format("%s v%d,v%d,v%d", FixOp(op).wx_str(), v0, v1, v2)); } void DisAsm_V2_UIMM(const wxString& op, u32 v0, u32 v1, u32 uimm) { - Write(wxString::Format("%s v%d,v%d,%u #%x", (const char*)FixOp(op).mb_str(), v0, v1, uimm, uimm)); + Write(wxString::Format("%s v%d,v%d,%u #%x", FixOp(op).wx_str(), v0, v1, uimm, uimm)); } void DisAsm_V2(const wxString& op, u32 v0, u32 v1) { - Write(wxString::Format("%s v%d,v%d", (const char*)FixOp(op).mb_str(), v0, v1)); + Write(wxString::Format("%s v%d,v%d", FixOp(op).wx_str(), v0, v1)); } void DisAsm_V1_SIMM(const wxString& op, u32 v0, s32 simm) { - Write(wxString::Format("%s v%d,%d #%x", (const char*)FixOp(op).mb_str(), v0, simm, simm)); + Write(wxString::Format("%s v%d,%d #%x", FixOp(op).wx_str(), v0, simm, simm)); } void DisAsm_V1(const wxString& op, u32 v0) { - Write(wxString::Format("%s v%d", (const char*)FixOp(op).mb_str(), v0)); + Write(wxString::Format("%s v%d", FixOp(op).wx_str(), v0)); } void DisAsm_V1_R2(const wxString& op, u32 v0, u32 r1, u32 r2) { - Write(wxString::Format("%s v%d,r%d,r%d", (const char*)FixOp(op).mb_str(), v0, r1, r2)); + Write(wxString::Format("%s v%d,r%d,r%d", FixOp(op).wx_str(), v0, r1, r2)); } void DisAsm_CR1_F2_RC(const wxString& op, u32 cr0, u32 f0, u32 f1, bool rc) { - Write(wxString::Format("%s%s cr%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", cr0, f0, f1)); + Write(wxString::Format("%s%s cr%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", cr0, f0, f1)); } void DisAsm_CR1_F2(const wxString& op, u32 cr0, u32 f0, u32 f1) { @@ -64,15 +64,15 @@ private: } void DisAsm_INT1_R2(const wxString& op, u32 i0, u32 r0, u32 r1) { - Write(wxString::Format("%s %d,r%d,r%d", (const char*)FixOp(op).mb_str(), i0, r0, r1)); + Write(wxString::Format("%s %d,r%d,r%d", FixOp(op).wx_str(), i0, r0, r1)); } void DisAsm_INT1_R1_IMM(const wxString& op, u32 i0, u32 r0, s32 imm0) { - Write(wxString::Format("%s %d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), i0, r0, imm0, imm0)); + Write(wxString::Format("%s %d,r%d,%d #%x", FixOp(op).wx_str(), i0, r0, imm0, imm0)); } void DisAsm_INT1_R1_RC(const wxString& op, u32 i0, u32 r0, bool rc) { - Write(wxString::Format("%s%s %d,r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", i0, r0)); + Write(wxString::Format("%s%s %d,r%d", FixOp(op).wx_str(), rc ? "." : "", i0, r0)); } void DisAsm_INT1_R1(const wxString& op, u32 i0, u32 r0) { @@ -80,11 +80,11 @@ private: } void DisAsm_F4_RC(const wxString& op, u32 f0, u32 f1, u32 f2, u32 f3, bool rc) { - Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1, f2, f3)); + Write(wxString::Format("%s%s f%d,f%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2, f3)); } void DisAsm_F3_RC(const wxString& op, u32 f0, u32 f1, u32 f2, bool rc) { - Write(wxString::Format("%s%s f%d,f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1, f2)); + Write(wxString::Format("%s%s f%d,f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1, f2)); } void DisAsm_F3(const wxString& op, u32 f0, u32 f1, u32 f2) { @@ -92,7 +92,7 @@ private: } void DisAsm_F2_RC(const wxString& op, u32 f0, u32 f1, bool rc) { - Write(wxString::Format("%s%s f%d,f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, f1)); + Write(wxString::Format("%s%s f%d,f%d", FixOp(op).wx_str(), rc ? "." : "", f0, f1)); } void DisAsm_F2(const wxString& op, u32 f0, u32 f1) { @@ -102,21 +102,21 @@ private: { if(m_mode == CPUDisAsm_CompilerElfMode) { - Write(wxString::Format("%s f%d,r%d,r%d", (const char*)FixOp(op).mb_str(), f0, r0, r1)); + Write(wxString::Format("%s f%d,r%d,r%d", FixOp(op).wx_str(), f0, r0, r1)); return; } - Write(wxString::Format("%s f%d,r%d(r%d)", (const char*)FixOp(op).mb_str(), f0, r0, r1)); + Write(wxString::Format("%s f%d,r%d(r%d)", FixOp(op).wx_str(), f0, r0, r1)); } void DisAsm_F1_IMM_R1_RC(const wxString& op, u32 f0, s32 imm0, u32 r0, bool rc) { if(m_mode == CPUDisAsm_CompilerElfMode) { - Write(wxString::Format("%s%s f%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, r0, imm0, imm0)); + Write(wxString::Format("%s%s f%d,r%d,%d #%x", FixOp(op).wx_str(), rc ? "." : "", f0, r0, imm0, imm0)); return; } - Write(wxString::Format("%s%s f%d,%d(r%d) #%x", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0, imm0, r0, imm0)); + Write(wxString::Format("%s%s f%d,%d(r%d) #%x", FixOp(op).wx_str(), rc ? "." : "", f0, imm0, r0, imm0)); } void DisAsm_F1_IMM_R1(const wxString& op, u32 f0, s32 imm0, u32 r0) { @@ -124,11 +124,11 @@ private: } void DisAsm_F1_RC(const wxString& op, u32 f0, bool rc) { - Write(wxString::Format("%s%s f%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", f0)); + Write(wxString::Format("%s%s f%d", FixOp(op).wx_str(), rc ? "." : "", f0)); } void DisAsm_R1_RC(const wxString& op, u32 r0, bool rc) { - Write(wxString::Format("%s%s r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0)); + Write(wxString::Format("%s%s r%d", FixOp(op).wx_str(), rc ? "." : "", r0)); } void DisAsm_R1(const wxString& op, u32 r0) { @@ -136,7 +136,7 @@ private: } void DisAsm_R2_OE_RC(const wxString& op, u32 r0, u32 r1, u32 oe, bool rc) { - Write(wxString::Format("%s%s%s r%d,r%d", (const char*)FixOp(op).mb_str(), oe ? "o" : "", rc ? "." : "", r0, r1)); + Write(wxString::Format("%s%s%s r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1)); } void DisAsm_R2_RC(const wxString& op, u32 r0, u32 r1, bool rc) { @@ -148,11 +148,11 @@ private: } void DisAsm_R3_OE_RC(const wxString& op, u32 r0, u32 r1, u32 r2, u32 oe, bool rc) { - Write(wxString::Format("%s%s%s r%d,r%d,r%d", (const char*)FixOp(op).mb_str(), oe ? "o" : "", rc ? "." : "", r0, r1, r2)); + Write(wxString::Format("%s%s%s r%d,r%d,r%d", FixOp(op).wx_str(), oe ? "o" : "", rc ? "." : "", r0, r1, r2)); } void DisAsm_R3_INT2_RC(const wxString& op, u32 r0, u32 r1, u32 r2, s32 i0, s32 i1, bool rc) { - Write(wxString::Format("%s%s r%d,r%d,r%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, r2, i0, i1)); + Write(wxString::Format("%s%s r%d,r%d,r%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, r2, i0, i1)); } void DisAsm_R3_RC(const wxString& op, u32 r0, u32 r1, u32 r2, bool rc) { @@ -164,7 +164,7 @@ private: } void DisAsm_R2_INT3_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2, bool rc) { - Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0, i1, i2)); + Write(wxString::Format("%s%s r%d,r%d,%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1, i2)); } void DisAsm_R2_INT3(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, s32 i2) { @@ -172,7 +172,7 @@ private: } void DisAsm_R2_INT2_RC(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1, bool rc) { - Write(wxString::Format("%s%s r%d,r%d,%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0, i1)); + Write(wxString::Format("%s%s r%d,r%d,%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0, i1)); } void DisAsm_R2_INT2(const wxString& op, u32 r0, u32 r1, s32 i0, s32 i1) { @@ -180,7 +180,7 @@ private: } void DisAsm_R2_INT1_RC(const wxString& op, u32 r0, u32 r1, s32 i0, bool rc) { - Write(wxString::Format("%s%s r%d,r%d,%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", r0, r1, i0)); + Write(wxString::Format("%s%s r%d,r%d,%d", FixOp(op).wx_str(), rc ? "." : "", r0, r1, i0)); } void DisAsm_R2_INT1(const wxString& op, u32 r0, u32 r1, s32 i0) { @@ -190,27 +190,27 @@ private: { if(m_mode == CPUDisAsm_CompilerElfMode) { - Write(wxString::Format("%s r%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), r0, r1, imm0, imm0)); + Write(wxString::Format("%s r%d,r%d,%d #%x", FixOp(op).wx_str(), r0, r1, imm0, imm0)); return; } - Write(wxString::Format("%s r%d,%d(r%d) #%x", (const char*)FixOp(op).mb_str(), r0, imm0, r1, imm0)); + Write(wxString::Format("%s r%d,%d(r%d) #%x", FixOp(op).wx_str(), r0, imm0, r1, imm0)); } void DisAsm_R1_IMM(const wxString& op, u32 r0, s32 imm0) { - Write(wxString::Format("%s r%d,%d #%x", (const char*)FixOp(op).mb_str(), r0, imm0, imm0)); + Write(wxString::Format("%s r%d,%d #%x", FixOp(op).wx_str(), r0, imm0, imm0)); } void DisAsm_IMM_R1(const wxString& op, s32 imm0, u32 r0) { - Write(wxString::Format("%s %d,r%d #%x", (const char*)FixOp(op).mb_str(), imm0, r0, imm0)); + Write(wxString::Format("%s %d,r%d #%x", FixOp(op).wx_str(), imm0, r0, imm0)); } void DisAsm_CR1_R1_IMM(const wxString& op, u32 cr0, u32 r0, s32 imm0) { - Write(wxString::Format("%s cr%d,r%d,%d #%x", (const char*)FixOp(op).mb_str(), cr0, r0, imm0, imm0)); + Write(wxString::Format("%s cr%d,r%d,%d #%x", FixOp(op).wx_str(), cr0, r0, imm0, imm0)); } void DisAsm_CR1_R2_RC(const wxString& op, u32 cr0, u32 r0, u32 r1, bool rc) { - Write(wxString::Format("%s%s cr%d,r%d,r%d", (const char*)FixOp(op).mb_str(), rc ? "." : "", cr0, r0, r1)); + Write(wxString::Format("%s%s cr%d,r%d,r%d", FixOp(op).wx_str(), rc ? "." : "", cr0, r0, r1)); } void DisAsm_CR1_R2(const wxString& op, u32 cr0, u32 r0, u32 r1) { @@ -218,31 +218,31 @@ private: } void DisAsm_CR2(const wxString& op, u32 cr0, u32 cr1) { - Write(wxString::Format("%s cr%d,cr%d", (const char*)FixOp(op).mb_str(), cr0, cr1)); + Write(wxString::Format("%s cr%d,cr%d", FixOp(op).wx_str(), cr0, cr1)); } void DisAsm_INT3(const wxString& op, const int i0, const int i1, const int i2) { - Write(wxString::Format("%s %d,%d,%d", (const char*)FixOp(op).mb_str(), i0, i1, i2)); + Write(wxString::Format("%s %d,%d,%d", FixOp(op).wx_str(), i0, i1, i2)); } void DisAsm_INT1(const wxString& op, const int i0) { - Write(wxString::Format("%s %d", (const char*)FixOp(op).mb_str(), i0)); + Write(wxString::Format("%s %d", FixOp(op).wx_str(), i0)); } void DisAsm_BRANCH(const wxString& op, const int pc) { - Write(wxString::Format("%s 0x%x", (const char*)FixOp(op).mb_str(), DisAsmBranchTarget(pc))); + Write(wxString::Format("%s 0x%x", FixOp(op).wx_str(), DisAsmBranchTarget(pc))); } void DisAsm_BRANCH_A(const wxString& op, const int pc) { - Write(wxString::Format("%s 0x%x", (const char*)FixOp(op).mb_str(), pc)); + Write(wxString::Format("%s 0x%x", FixOp(op).wx_str(), pc)); } void DisAsm_B2_BRANCH(const wxString& op, u32 b0, u32 b1, const int pc) { - Write(wxString::Format("%s %d,%d,0x%x ", (const char*)FixOp(op).mb_str(), b0, b1, DisAsmBranchTarget(pc))); + Write(wxString::Format("%s %d,%d,0x%x ", FixOp(op).wx_str(), b0, b1, DisAsmBranchTarget(pc))); } void DisAsm_CR_BRANCH(const wxString& op, u32 cr, const int pc) { - Write(wxString::Format("%s cr%d,0x%x ", (const char*)FixOp(op).mb_str(), cr, DisAsmBranchTarget(pc))); + Write(wxString::Format("%s cr%d,0x%x ", FixOp(op).wx_str(), cr, DisAsmBranchTarget(pc))); } private: diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index 7985b57b28..b0bbb9043f 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -3950,7 +3950,7 @@ private: for(uint i=0; i<32; ++i) ConLog.Write("r%d = 0x%llx", i, CPU.GPR[i]); for(uint i=0; i<32; ++i) ConLog.Write("f%d = %llf", i, CPU.FPR[i]); - for(uint i=0; i<32; ++i) ConLog.Write("v%d = 0x%s [%s]", i, CPU.VPR[i].ToString(true).mb_str(), CPU.VPR[i].ToString().mb_str()); + for(uint i=0; i<32; ++i) ConLog.Write("v%d = 0x%s [%s]", i, CPU.VPR[i].ToString(true).wx_str(), CPU.VPR[i].ToString().wx_str()); ConLog.Write("CR = 0x%08x", CPU.CR); ConLog.Write("LR = 0x%llx", CPU.LR); ConLog.Write("CTR = 0x%llx", CPU.CTR); diff --git a/rpcs3/Emu/Cell/PPUProgramCompiler.cpp b/rpcs3/Emu/Cell/PPUProgramCompiler.cpp index bd0ed1982d..50310d47ae 100644 --- a/rpcs3/Emu/Cell/PPUProgramCompiler.cpp +++ b/rpcs3/Emu/Cell/PPUProgramCompiler.cpp @@ -149,7 +149,7 @@ void CompilePPUProgram::WriteError(const wxString& error) { if(m_err_list) { - m_err_list->WriteText(wxString::Format("line %lld: %s\n", m_line, (const char*)error.mb_str())); + m_err_list->WriteText(wxString::Format("line %lld: %s\n", m_line, static_cast(error))); } } @@ -373,7 +373,7 @@ void CompilePPUProgram::DetectArgInfo(Arg& arg) { for(u32 i=0; i= 0) return m_text_addr + m_branches[i].m_pos * 4; @@ -667,7 +667,7 @@ CompilePPUProgram::Branch& CompilePPUProgram::GetBranch(const wxString& name) { for(u32 i=0; i& bp = Emu.GetBreakPoints(); @@ -327,12 +327,12 @@ void RawSPUThread::Task() } catch(const wxString& e) { - ConLog.Error("Exception: %s", e.mb_str()); + ConLog.Error("Exception: %s", e.wx_str()); } catch(const char* e) { ConLog.Error("Exception: %s", e); } - ConLog.Write("%s leave", PPCThread::GetFName().mb_str()); + ConLog.Write("%s leave", PPCThread::GetFName().wx_str()); } diff --git a/rpcs3/Emu/Cell/SPUDisAsm.h b/rpcs3/Emu/Cell/SPUDisAsm.h index 57eaa26d3e..ce6f285620 100644 --- a/rpcs3/Emu/Cell/SPUDisAsm.h +++ b/rpcs3/Emu/Cell/SPUDisAsm.h @@ -37,43 +37,43 @@ private: } void DisAsm(wxString op, u32 a1) { - Write(wxString::Format("%s 0x%x", (const char*)FixOp(op).mb_str(), a1)); + Write(wxString::Format("%s 0x%x", FixOp(op).wx_str(), a1)); } void DisAsm(wxString op, const char* a1) { - Write(wxString::Format("%s %s", (const char*)FixOp(op).mb_str(), a1)); + Write(wxString::Format("%s %s", FixOp(op).wx_str(), a1)); } void DisAsm(wxString op, const char* a1, const char* a2) { - Write(wxString::Format("%s %s,%s", (const char*)FixOp(op).mb_str(), a1, a2)); + Write(wxString::Format("%s %s,%s", FixOp(op).wx_str(), a1, a2)); } void DisAsm(wxString op, int a1, const char* a2) { - Write(wxString::Format("%s 0x%x,%s", (const char*)FixOp(op).mb_str(), a1, a2)); + Write(wxString::Format("%s 0x%x,%s", FixOp(op).wx_str(), a1, a2)); } void DisAsm(wxString op, const char* a1, int a2) { - Write(wxString::Format("%s %s,0x%x", (const char*)FixOp(op).mb_str(), a1, a2)); + Write(wxString::Format("%s %s,0x%x", FixOp(op).wx_str(), a1, a2)); } void DisAsm(wxString op, int a1, int a2) { - Write(wxString::Format("%s 0x%x,0x%x", (const char*)FixOp(op).mb_str(), a1, a2)); + Write(wxString::Format("%s 0x%x,0x%x", FixOp(op).wx_str(), a1, a2)); } void DisAsm(wxString op, const char* a1, const char* a2, const char* a3) { - Write(wxString::Format("%s %s,%s,%s", (const char*)FixOp(op).mb_str(), a1, a2, a3)); + Write(wxString::Format("%s %s,%s,%s", FixOp(op).wx_str(), a1, a2, a3)); } void DisAsm(wxString op, const char* a1, int a2, const char* a3) { - Write(wxString::Format("%s %s,0x%x(%s)", (const char*)FixOp(op).mb_str(), a1, a2, a3)); + Write(wxString::Format("%s %s,0x%x(%s)", FixOp(op).wx_str(), a1, a2, a3)); } void DisAsm(wxString op, const char* a1, const char* a2, int a3) { - Write(wxString::Format("%s %s,%s,0x%x", (const char*)FixOp(op).mb_str(), a1, a2, a3)); + Write(wxString::Format("%s %s,%s,0x%x", FixOp(op).wx_str(), a1, a2, a3)); } void DisAsm(wxString op, const char* a1, const char* a2, const char* a3, const char* a4) { - Write(wxString::Format("%s %s,%s,%s,%s", (const char*)FixOp(op).mb_str(), a1, a2, a3, a4)); + Write(wxString::Format("%s %s,%s,%s,%s", FixOp(op).wx_str(), a1, a2, a3, a4)); } //0 - 10 void STOP(u32 code) diff --git a/rpcs3/Emu/Cell/SPUInterpreter.h b/rpcs3/Emu/Cell/SPUInterpreter.h index f3c89b476a..361e8c7e27 100644 --- a/rpcs3/Emu/Cell/SPUInterpreter.h +++ b/rpcs3/Emu/Cell/SPUInterpreter.h @@ -1426,6 +1426,6 @@ private: { ConLog.Error(err + wxString::Format(" #pc: 0x%x", CPU.PC)); Emu.Pause(); - for(uint i=0; i<128; ++i) ConLog.Write("r%d = 0x%s", i, (const char*)CPU.GPR[i].ToString().mb_str()); + for(uint i=0; i<128; ++i) ConLog.Write("r%d = 0x%s", i, CPU.GPR[i].ToString().wx_str()); } }; diff --git a/rpcs3/Emu/Cell/SPUThread.h b/rpcs3/Emu/Cell/SPUThread.h index 591b77723e..c0ca556aaa 100644 --- a/rpcs3/Emu/Cell/SPUThread.h +++ b/rpcs3/Emu/Cell/SPUThread.h @@ -748,7 +748,7 @@ public: { wxString ret = "Registers:\n=========\n"; - for(uint i=0; i<128; ++i) ret += wxString::Format("GPR[%d] = 0x%s\n", i, (const char*)GPR[i].ToString().mb_str()); + for(uint i=0; i<128; ++i) ret += wxString::Format("GPR[%d] = 0x%s\n", i, GPR[i].ToString().wx_str()); return ret; } diff --git a/rpcs3/Emu/GS/GL/GLProgram.cpp b/rpcs3/Emu/GS/GL/GLProgram.cpp index 80b11d168e..4b00d80e29 100644 --- a/rpcs3/Emu/GS/GL/GLProgram.cpp +++ b/rpcs3/Emu/GS/GL/GLProgram.cpp @@ -20,7 +20,7 @@ int GLProgram::GetLocation(const wxString& name) m_locations[pos].name = name; m_locations[pos].loc = glGetUniformLocation(id, name); - checkForGlError(wxString::Format("glGetUniformLocation(0x%x, %s)", id, (const char*)name.mb_str())); + checkForGlError(wxString::Format("glGetUniformLocation(0x%x, %s)", id, name.wx_str())); return m_locations[pos].loc; } diff --git a/rpcs3/Emu/GS/GL/GLVertexProgram.cpp b/rpcs3/Emu/GS/GL/GLVertexProgram.cpp index 315d30cdb6..9f780bfa93 100644 --- a/rpcs3/Emu/GS/GL/GLVertexProgram.cpp +++ b/rpcs3/Emu/GS/GL/GLVertexProgram.cpp @@ -314,16 +314,16 @@ wxString GLVertexDecompilerThread::BuildCode() for(int i=m_funcs.GetCount() - 1; i>0; --i) { - fp += wxString::Format("void %s();\n", (const char*)m_funcs[i].name.mb_str()); + fp += wxString::Format("void %s();\n", m_funcs[i].name.wx_str()); } wxString f = wxEmptyString; - f += wxString::Format("void %s()\n{\n\tgl_Position = vec4(0.0f, 0.0f, 0.0f, 1.0f);\n%s}\n", (const char*)m_funcs[0].name.mb_str(), (const char*)BuildFuncBody(m_funcs[0]).mb_str()); + f += wxString::Format("void %s()\n{\n\tgl_Position = vec4(0.0f, 0.0f, 0.0f, 1.0f);\n%s}\n", m_funcs[0].name.wx_str(), BuildFuncBody(m_funcs[0]).wx_str()); for(uint i=1; i img) int sys_raw_spu_load(int id, u32 path_addr, mem32_t entry) { - const wxString path = Memory.ReadString(path_addr).mb_str(); + const wxString path = Memory.ReadString(path_addr).wx_str(); sysPrxForUser.Warning("sys_raw_spu_load(id=0x%x, path=0x%x [%s], entry_addr=0x%x)", id, path_addr, path.c_str(), entry.GetAddr()); diff --git a/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp b/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp index 2c5ade09ac..df0f4e2088 100644 --- a/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp @@ -40,14 +40,14 @@ int sdata_unpack(wxString packed_file, wxString unpacked_file) if(!packed_stream || !packed_stream->IsOpened()) { - sys_fs.Error("'%s' not found! flags: 0x%08x", packed_file.mb_str(), vfsRead); + sys_fs.Error("'%s' not found! flags: 0x%08x", packed_file.wx_str(), vfsRead); delete packed_stream; return CELL_ENOENT; } if(!unpacked_stream || !unpacked_stream->IsOpened()) { - sys_fs.Error("'%s' couldn't be created! flags: 0x%08x", unpacked_file.mb_str(), vfsWrite); + sys_fs.Error("'%s' couldn't be created! flags: 0x%08x", unpacked_file.wx_str(), vfsWrite); delete unpacked_stream; return CELL_ENOENT; } @@ -116,7 +116,7 @@ int cellFsSdataOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size) { const wxString& path = Memory.ReadString(path_addr); sys_fs.Warning("cellFsSdataOpen(path: %s, flags: 0x%x, fd_addr: 0x%x, arg_addr: 0x%x, size: 0x%llx)", - path.mb_str(), flags, fd.GetAddr(), arg.GetAddr(), size); + path.wx_str(), flags, fd.GetAddr(), arg.GetAddr(), size); if (!fd.IsGood() || (!arg.IsGood() && size)) return CELL_EFAULT; diff --git a/rpcs3/Emu/SysCalls/SysCalls.h b/rpcs3/Emu/SysCalls/SysCalls.h index 212b58edef..380b732ad2 100644 --- a/rpcs3/Emu/SysCalls/SysCalls.h +++ b/rpcs3/Emu/SysCalls/SysCalls.h @@ -36,7 +36,7 @@ public: { va_list list; va_start(list, fmt); - ConLog.Write(GetName() + wxString::Format("[%d]: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); + ConLog.Write(GetName() + wxString::Format("[%d]: ", id).wx_str() + wxString::FormatV(fmt, list).wx_str()); va_end(list); } } @@ -47,7 +47,7 @@ public: { va_list list; va_start(list, fmt); - ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list).mb_str()); + ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list).wx_str()); va_end(list); } } @@ -57,7 +57,7 @@ public: //#ifdef SYSCALLS_DEBUG va_list list; va_start(list, fmt); - ConLog.Warning(GetName() + wxString::Format("[%d] warning: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); + ConLog.Warning(GetName() + wxString::Format("[%d] warning: ", id).wx_str() + wxString::FormatV(fmt, list).wx_str()); va_end(list); //#endif } @@ -67,7 +67,7 @@ public: //#ifdef SYSCALLS_DEBUG va_list list; va_start(list, fmt); - ConLog.Warning(GetName() + " warning: " + wxString::FormatV(fmt, list).mb_str()); + ConLog.Warning(GetName() + " warning: " + wxString::FormatV(fmt, list).wx_str()); va_end(list); //#endif } @@ -76,7 +76,7 @@ public: { va_list list; va_start(list, fmt); - ConLog.Error(GetName() + wxString::Format("[%d] error: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); + ConLog.Error(GetName() + wxString::Format("[%d] error: ", id).wx_str() + wxString::FormatV(fmt, list).wx_str()); va_end(list); } @@ -84,7 +84,7 @@ public: { va_list list; va_start(list, fmt); - ConLog.Error(GetName() + " error: " + wxString::FormatV(fmt, list).mb_str()); + ConLog.Error(GetName() + " error: " + wxString::FormatV(fmt, list).wx_str()); va_end(list); } diff --git a/rpcs3/Emu/SysCalls/lv2/SC_FileSystem.cpp b/rpcs3/Emu/SysCalls/lv2/SC_FileSystem.cpp index 830f634421..49103b58ca 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_FileSystem.cpp +++ b/rpcs3/Emu/SysCalls/lv2/SC_FileSystem.cpp @@ -8,7 +8,7 @@ int cellFsOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size) { const wxString& path = Memory.ReadString(path_addr); sys_fs.Log("cellFsOpen(path: %s, flags: 0x%x, fd_addr: 0x%x, arg_addr: 0x%x, size: 0x%llx)", - path.mb_str(), flags, fd.GetAddr(), arg.GetAddr(), size); + path.wx_str(), flags, fd.GetAddr(), arg.GetAddr(), size); const wxString& ppath = path; //ConLog.Warning("path: %s [%s]", ppath, path); @@ -57,7 +57,7 @@ int cellFsOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size) if(_oflags != 0) { - sys_fs.Error("'%s' has unknown flags! flags: 0x%08x", ppath.mb_str(), flags); + sys_fs.Error("'%s' has unknown flags! flags: 0x%08x", ppath.wx_str(), flags); return CELL_EINVAL; } @@ -65,14 +65,14 @@ int cellFsOpen(u32 path_addr, int flags, mem32_t fd, mem32_t arg, u64 size) if(!stream || !stream->IsOpened()) { - sys_fs.Error("'%s' not found! flags: 0x%08x", ppath.mb_str(), flags); + sys_fs.Error("'%s' not found! flags: 0x%08x", ppath.wx_str(), flags); delete stream; return CELL_ENOENT; } fd = sys_fs.GetNewId(stream, flags); - ConLog.Warning("*** cellFsOpen(path: %s): fd=%d", path.mb_str(), fd.GetValue()); + ConLog.Warning("*** cellFsOpen(path: %s): fd=%d", path.wx_str(), fd.GetValue()); return CELL_OK; } @@ -132,7 +132,7 @@ int cellFsClose(u32 fd) int cellFsOpendir(u32 path_addr, mem32_t fd) { const wxString& path = Memory.ReadString(path_addr); - sys_fs.Warning("cellFsOpendir(path=\"%s\", fd_addr=0x%x)", path.mb_str(), fd.GetAddr()); + sys_fs.Warning("cellFsOpendir(path=\"%s\", fd_addr=0x%x)", path.wx_str(), fd.GetAddr()); if(!Memory.IsGoodAddr(path_addr) || !fd.IsGood()) return CELL_EFAULT; @@ -161,7 +161,7 @@ int cellFsReaddir(u32 fd, mem_ptr_t dir, mem64_t nread) if(info) { nread = 1; - Memory.WriteString(dir.GetAddr()+2, info->name.mb_str()); + Memory.WriteString(dir.GetAddr()+2, info->name.wx_str()); dir->d_namlen = info->name.Length(); dir->d_type = (info->flags & 0x1) ? CELL_FS_TYPE_REGULAR : CELL_FS_TYPE_DIRECTORY; } @@ -186,7 +186,7 @@ int cellFsClosedir(u32 fd) int cellFsStat(const u32 path_addr, mem_ptr_t sb) { const wxString& path = Memory.ReadString(path_addr); - sys_fs.Log("cellFsStat(path: %s, sb_addr: 0x%x)", path.mb_str(), sb.GetAddr()); + sys_fs.Log("cellFsStat(path: %s, sb_addr: 0x%x)", path.wx_str(), sb.GetAddr()); sb->st_mode = CELL_FS_S_IRUSR | CELL_FS_S_IWUSR | CELL_FS_S_IXUSR | @@ -205,7 +205,7 @@ int cellFsStat(const u32 path_addr, mem_ptr_t sb) { if(path.CmpNoCase(Emu.GetVFS().m_devices[i].GetPs3Path().RemoveLast(1)) == 0) { - sys_fs.Log("cellFsStat: '%s' is a mount point.", path.mb_str()); + sys_fs.Log("cellFsStat: '%s' is a mount point.", path.wx_str()); sb->st_mode |= CELL_FS_S_IFDIR; return CELL_OK; } @@ -230,7 +230,7 @@ int cellFsStat(const u32 path_addr, mem_ptr_t sb) } else { - sys_fs.Warning("cellFsStat: '%s' not found.", path.mb_str()); + sys_fs.Warning("cellFsStat: '%s' not found.", path.wx_str()); return CELL_ENOENT; } @@ -264,7 +264,7 @@ int cellFsFstat(u32 fd, mem_ptr_t sb) int cellFsMkdir(u32 path_addr, u32 mode) { const wxString& ps3_path = Memory.ReadString(path_addr); - sys_fs.Log("cellFsMkdir(path=\"%s\", mode=0x%x)", ps3_path.mb_str(), mode); + sys_fs.Log("cellFsMkdir(path=\"%s\", mode=0x%x)", ps3_path.wx_str(), mode); wxString localPath; Emu.GetVFS().GetDevice(ps3_path, localPath); @@ -282,7 +282,7 @@ int cellFsRename(u32 from_addr, u32 to_addr) Emu.GetVFS().GetDevice(ps3_from, from); Emu.GetVFS().GetDevice(ps3_to, to); - sys_fs.Log("cellFsRename(from=\"%s\", to=\"%s\")", ps3_from.mb_str(), ps3_to.mb_str()); + sys_fs.Log("cellFsRename(from=\"%s\", to=\"%s\")", ps3_from.wx_str(), ps3_to.wx_str()); if(!wxFileExists(from)) return CELL_ENOENT; if(wxFileExists(to)) return CELL_EEXIST; if(!wxRenameFile(from, to)) return CELL_EBUSY; // (TODO: RenameFile(a,b) = CopyFile(a,b) + RemoveFile(a), therefore file "a" will not be removed if it is opened) @@ -292,7 +292,7 @@ int cellFsRename(u32 from_addr, u32 to_addr) int cellFsRmdir(u32 path_addr) { const wxString& ps3_path = Memory.ReadString(path_addr); - sys_fs.Log("cellFsRmdir(path=\"%s\")", ps3_path.mb_str()); + sys_fs.Log("cellFsRmdir(path=\"%s\")", ps3_path.wx_str()); wxString localPath; Emu.GetVFS().GetDevice(ps3_path, localPath); @@ -304,7 +304,7 @@ int cellFsRmdir(u32 path_addr) int cellFsUnlink(u32 path_addr) { const wxString& ps3_path = Memory.ReadString(path_addr); - sys_fs.Warning("cellFsUnlink(path=\"%s\")", ps3_path.mb_str()); + sys_fs.Warning("cellFsUnlink(path=\"%s\")", ps3_path.wx_str()); wxString localPath; Emu.GetVFS().GetDevice(ps3_path, localPath); @@ -360,12 +360,12 @@ int cellFsFtruncate(u32 fd, u64 size) int cellFsTruncate(u32 path_addr, u64 size) { const wxString& path = Memory.ReadString(path_addr); - sys_fs.Log("cellFsTruncate(path: %s, size: %lld)", path.mb_str(), size); + sys_fs.Log("cellFsTruncate(path: %s, size: %lld)", path.wx_str(), size); vfsFile f(path, vfsReadWrite); if(!f.IsOpened()) { - sys_fs.Warning("cellFsTruncate: '%s' not found.", path.mb_str()); + sys_fs.Warning("cellFsTruncate: '%s' not found.", path.wx_str()); return CELL_ENOENT; } u64 initialSize = f.GetSize(); diff --git a/rpcs3/Emu/SysCalls/lv2/SC_PPU_Thread.cpp b/rpcs3/Emu/SysCalls/lv2/SC_PPU_Thread.cpp index b097f98d78..4b14b10c31 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_PPU_Thread.cpp +++ b/rpcs3/Emu/SysCalls/lv2/SC_PPU_Thread.cpp @@ -134,7 +134,7 @@ int sys_ppu_thread_restart(u32 thread_id) int sys_ppu_thread_create(u32 thread_id_addr, u32 entry, u64 arg, int prio, u32 stacksize, u64 flags, u32 threadname_addr) { sysPrxForUser.Log("sys_ppu_thread_create(thread_id_addr=0x%x, entry=0x%x, arg=0x%x, prio=%d, stacksize=0x%x, flags=0x%llx, threadname_addr=0x%x('%s'))", - thread_id_addr, entry, arg, prio, stacksize, flags, threadname_addr, Memory.ReadString(threadname_addr).mb_str()); + thread_id_addr, entry, arg, prio, stacksize, flags, threadname_addr, Memory.ReadString(threadname_addr).wx_str()); if(!Memory.IsGoodAddr(entry) || !Memory.IsGoodAddr(thread_id_addr) || !Memory.IsGoodAddr(threadname_addr)) { @@ -149,7 +149,7 @@ int sys_ppu_thread_create(u32 thread_id_addr, u32 entry, u64 arg, int prio, u32 new_thread.SetPrio(prio); new_thread.SetStackSize(stacksize); //new_thread.flags = flags; - new_thread.SetName((const char*)Memory.ReadString(threadname_addr).mb_str()); + new_thread.SetName(Memory.ReadString(threadname_addr).ToStdString()); new_thread.Run(); new_thread.Exec(); diff --git a/rpcs3/Emu/SysCalls/lv2/SC_Process.cpp b/rpcs3/Emu/SysCalls/lv2/SC_Process.cpp index 7e4ddd320c..8ceab802c8 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_Process.cpp +++ b/rpcs3/Emu/SysCalls/lv2/SC_Process.cpp @@ -49,7 +49,7 @@ int sys_game_process_exitspawn( u32 path_addr, u32 argv_addr, u32 envp_addr, u32 data, u32 data_size, int prio, u64 flags ) { sc_p.Log("sys_game_process_exitspawn: "); - sc_p.Log("path: %s", Memory.ReadString(path_addr).mb_str()); + sc_p.Log("path: %s", Memory.ReadString(path_addr).wx_str()); sc_p.Log("argv: 0x%x", Memory.Read32(argv_addr)); sc_p.Log("envp: 0x%x", Memory.Read32(envp_addr)); sc_p.Log("data: 0x%x", data); diff --git a/rpcs3/Emu/SysCalls/lv2/SC_SPU_Thread.cpp b/rpcs3/Emu/SysCalls/lv2/SC_SPU_Thread.cpp index d816cffbe9..f92f4b8dc3 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_SPU_Thread.cpp +++ b/rpcs3/Emu/SysCalls/lv2/SC_SPU_Thread.cpp @@ -66,7 +66,7 @@ u32 LoadSpuImage(vfsStream& stream) //156 int sys_spu_image_open(mem_ptr_t img, u32 path_addr) { - const wxString path = Memory.ReadString(path_addr).mb_str(); + const wxString path = Memory.ReadString(path_addr).wx_str(); sc_spu.Warning("sys_spu_image_open(img_addr=0x%x, path_addr=0x%x [%s])", img.GetAddr(), path_addr, path.c_str()); if(!img.IsGood() || !Memory.IsGoodAddr(path_addr)) @@ -125,7 +125,7 @@ int sys_spu_thread_initialize(mem32_t thread, u32 group, u32 spu_num, mem_ptr_t< } u32 spu_ep = (u32)img->entry_point; - std::string name = Memory.ReadString(attr->name_addr, attr->name_len).mb_str(); + std::string name = Memory.ReadString(attr->name_addr, attr->name_len).ToStdString(); u64 a1 = arg->arg1; u64 a2 = arg->arg2; u64 a3 = arg->arg3; diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 69095f95bd..59683afbef 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -188,7 +188,7 @@ void Emulator::Load() { if(!wxFileExists(m_path)) return; - if(IsSelf((const char *)m_path.mb_str())) + if(IsSelf(m_path.ToStdString())) { std::string self_path = m_path; std::string elf_path = wxFileName(m_path).GetPath().c_str(); @@ -208,7 +208,7 @@ void Emulator::Load() m_path = elf_path; } - ConLog.Write("Loading '%s'...", m_path.mb_str()); + ConLog.Write("Loading '%s'...", m_path.wx_str()); GetInfo().Reset(); m_vfs.Init(m_path); @@ -216,7 +216,7 @@ void Emulator::Load() ConLog.Write("Mount info:"); for(uint i=0; i %s", m_vfs.m_devices[i].GetPs3Path().mb_str(), m_vfs.m_devices[i].GetLocalPath().mb_str()); + ConLog.Write("%s -> %s", m_vfs.m_devices[i].GetPs3Path().wx_str(), m_vfs.m_devices[i].GetLocalPath().wx_str()); } ConLog.SkipLn(); @@ -229,7 +229,7 @@ void Emulator::Load() if(!f.IsOpened()) { - ConLog.Error("Elf not found! (%s - %s)", m_path.mb_str(), m_elf_path.mb_str()); + ConLog.Error("Elf not found! (%s - %s)", m_path.wx_str(), m_elf_path.wx_str()); return; } diff --git a/rpcs3/Gui/ConLog.cpp b/rpcs3/Gui/ConLog.cpp index 91c2520696..f511f4524d 100644 --- a/rpcs3/Gui/ConLog.cpp +++ b/rpcs3/Gui/ConLog.cpp @@ -148,22 +148,22 @@ void LogWriter::WriteToLog(std::string prefix, std::string value, std::string co LogBuffer.Push(LogPacket(prefix, value, colour)); } -wxString FormatV(const wxString fmt, va_list args) -{ - int length = 256; - wxString str; - - for(;;) - { - str.Clear(); - wxStringBuffer buf(str, length+1); - memset(buf, 0, length+1); - if(vsnprintf((char *)((wxStringCharType *)buf), length, fmt, args) != -1) break; - length *= 2; - } - - return str; -} +//wxString FormatV(const wxString fmt, va_list args) +//{ +// int length = 256; +// wxString str; +// +// for(;;) +// { +// str.Clear(); +// wxStringBuffer buf(str, length+1); +// memset(buf, 0, length+1); +// if(vsnprintf((char *)((wxStringCharType *)buf), length, fmt, args) != -1) break; +// length *= 2; +// } +// +// return str; +//} void LogWriter::Write(const wxString fmt, ...) { @@ -175,7 +175,7 @@ void LogWriter::Write(const wxString fmt, ...) va_end(list); - WriteToLog("!", (const char *)frmt.mb_str(), "White"); + WriteToLog("!", static_cast(frmt), "White"); } void LogWriter::Error(const wxString fmt, ...) @@ -183,11 +183,12 @@ void LogWriter::Error(const wxString fmt, ...) va_list list; va_start(list, fmt); - const wxString& frmt = FormatV(fmt, list); + wxString frmt; + frmt.PrintfV(fmt, list); va_end(list); - WriteToLog("E", (const char *)frmt.mb_str(), "Red"); + WriteToLog("E", static_cast(frmt), "Red"); } void LogWriter::Warning(const wxString fmt, ...) @@ -195,11 +196,12 @@ void LogWriter::Warning(const wxString fmt, ...) va_list list; va_start(list, fmt); - const wxString& frmt = FormatV(fmt, list); + wxString frmt; + frmt.PrintfV(fmt, list); va_end(list); - WriteToLog("W", (const char *)frmt.mb_str(), "Yellow"); + WriteToLog("W", static_cast(frmt), "Yellow"); } void LogWriter::Success(const wxString fmt, ...) @@ -207,11 +209,12 @@ void LogWriter::Success(const wxString fmt, ...) va_list list; va_start(list, fmt); - const wxString& frmt = FormatV(fmt, list); + wxString frmt; + frmt.PrintfV(fmt, list); va_end(list); - WriteToLog("S", (const char *)frmt.mb_str(), "Green"); + WriteToLog("S", static_cast(frmt), "Green"); } void LogWriter::SkipLn() diff --git a/rpcs3/Gui/DisAsmFrame.cpp b/rpcs3/Gui/DisAsmFrame.cpp index 4e18ea8e4e..f8521c5fc7 100644 --- a/rpcs3/Gui/DisAsmFrame.cpp +++ b/rpcs3/Gui/DisAsmFrame.cpp @@ -295,7 +295,7 @@ void DisAsmFrame::Dump(wxCommandEvent& WXUNUSED(event)) if(ctrl.ShowModal() == wxID_CANCEL) return; vfsStream& f_elf = *new vfsLocalFile(Emu.m_path); - ConLog.Write("path: %s", Emu.m_path.mb_str()); + ConLog.Write("path: %s", Emu.m_path.wx_str()); Elf_Ehdr ehdr; ehdr.Load(f_elf); @@ -384,8 +384,8 @@ void DisAsmFrame::Dump(wxCommandEvent& WXUNUSED(event)) const wxString name = sh < name_arr.GetCount() ? name_arr[sh] : "Unknown"; - fd.Write(wxString::Format("Start of section header %s[%d] (instructions count: %d)\n", (const char*)name.mb_str(), sh, sh_size)); - prog_dial.Update(0, vsize, wxString::Format("Disasm %s section", (const char*)name.mb_str())); + fd.Write(wxString::Format("Start of section header %s[%d] (instructions count: %d)\n", name.wx_str(), sh, sh_size)); + prog_dial.Update(0, vsize, wxString::Format("Disasm %s section", name.wx_str())); if(Memory.IsGoodAddr(sh_addr)) { @@ -397,7 +397,7 @@ void DisAsmFrame::Dump(wxCommandEvent& WXUNUSED(event)) fd.Write(disasm->last_opcode); } } - fd.Write(wxString::Format("End of section header %s[%d]\n\n", (const char*)name.mb_str(), sh)); + fd.Write(wxString::Format("End of section header %s[%d]\n\n", name.wx_str(), sh)); } prog_dial.Close(); diff --git a/rpcs3/Gui/GameViewer.cpp b/rpcs3/Gui/GameViewer.cpp index 4c9c0b9ed8..ddb79e6c3c 100644 --- a/rpcs3/Gui/GameViewer.cpp +++ b/rpcs3/Gui/GameViewer.cpp @@ -91,9 +91,9 @@ void GameViewer::DClick(wxListEvent& event) const wxString& path = m_path + m_game_data[i].root; Emu.Stop(); - if(!Emu.BootGame((const char *)path.mb_str())) + if(!Emu.BootGame(path.ToStdString())) { - ConLog.Error("Boot error: elf not found! [%s]", path.mb_str()); + ConLog.Error("Boot error: elf not found! [%s]", path.wx_str()); return; } Emu.Run(); diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index 41cdbc8c76..c59f7227f9 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -192,13 +192,13 @@ void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event)) Emu.Stop(); - if(Emu.BootGame((const char *)ctrl.GetPath().mb_str())) + if(Emu.BootGame(ctrl.GetPath().ToStdString())) { ConLog.Success("Game: boot done."); } else { - ConLog.Error("Ps3 executable not found in selected folder (%s)", ctrl.GetPath().mb_str()); + ConLog.Error("Ps3 executable not found in selected folder (%s)", ctrl.GetPath().wx_str()); } } @@ -226,7 +226,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event)) Emu.Stop(); wxString fileName = ctrl.GetPath(); - if (!pkg_unpack((const char *)fileName.mb_str())) + if (!pkg_unpack(static_cast(fileName))) ConLog.Error("Could not unpack PKG!"); else ConLog.Success("PKG: extract done."); @@ -234,7 +234,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event)) ConLog.Warning("Could not delete the decoded DEC file"); pkg_header *header; - pkg_info((const char *)fileName.mb_str(), &header); + pkg_info(static_cast(fileName), &header); wxString titleID_full (header->title_id); wxString titleID = titleID_full.SubString(7, 15); @@ -250,7 +250,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event)) //Refresh game list m_game_viewer->Refresh(); - if(Emu.BootGame((const char*)pkgDir.mb_str())) + if(Emu.BootGame(pkgDir.ToStdString())) { ConLog.Success("Game: boot done."); } diff --git a/rpcs3/Gui/VHDDManager.cpp b/rpcs3/Gui/VHDDManager.cpp index a263b6970d..679bf5bf72 100644 --- a/rpcs3/Gui/VHDDManager.cpp +++ b/rpcs3/Gui/VHDDManager.cpp @@ -141,7 +141,7 @@ void VHDDExplorer::Export(const wxString& path, const wxString& to) { if(!m_hdd->Open(path)) { - wxMessageBox(wxString::Format("EXPORT ERROR: file open error. (%s)", (const char*)path.mb_str())); + wxMessageBox(wxString::Format("EXPORT ERROR: file open error. (%s)", path.wx_str())); return; } @@ -188,7 +188,7 @@ void VHDDExplorer::OnDropFiles(wxDropFilesEvent& event) for(int i=0; iSetLoaded(); } else { - ConLog.Warning("Unknown module '%s'", module_name.mb_str()); + ConLog.Warning("Unknown module '%s'", module_name.wx_str()); } #ifdef LOADER_DEBUG @@ -353,7 +353,7 @@ bool ELF64Loader::LoadPhdrData(u64 offset) ConLog.Write("*** unk0: 0x%x", stub.s_unk0); ConLog.Write("*** unk1: 0x%x", stub.s_unk1); ConLog.Write("*** imports: %d", stub.s_imports); - ConLog.Write("*** module name: %s [0x%x]", module_name.mb_str(), stub.s_modulename); + ConLog.Write("*** module name: %s [0x%x]", module_name.wx_str(), stub.s_modulename); ConLog.Write("*** nid: 0x%x", stub.s_nid); ConLog.Write("*** text: 0x%x", stub.s_text); #endif @@ -370,7 +370,7 @@ bool ELF64Loader::LoadPhdrData(u64 offset) { if(!module->Load(nid)) { - ConLog.Warning("Unknown function 0x%08x in '%s' module", nid, module_name.mb_str()); + ConLog.Warning("Unknown function 0x%08x in '%s' module", nid, module_name.wx_str()); SysCalls::DoFunc(nid); } } diff --git a/rpcs3/Loader/Loader.cpp b/rpcs3/Loader/Loader.cpp index bb93b34a62..3eab6b0acd 100644 --- a/rpcs3/Loader/Loader.cpp +++ b/rpcs3/Loader/Loader.cpp @@ -72,7 +72,7 @@ const wxString Phdr_FlagsToString(u32 flags) flags &= ~spu << 0x14; flags &= ~rsx << 0x18; - if(flags != 0) return wxString::Format("Unknown %s PPU[%x] SPU[%x] RSX[%x]", (const char*)ret.mb_str(), ppu, spu, rsx); + if(flags != 0) return wxString::Format("Unknown %s PPU[%x] SPU[%x] RSX[%x]", ret.wx_str(), ppu, spu, rsx); ret += "PPU[" + FLAGS_TO_STRING(ppu) + "] "; ret += "SPU[" + FLAGS_TO_STRING(spu) + "] "; diff --git a/rpcs3/Loader/PSF.h b/rpcs3/Loader/PSF.h index 9598c993a2..b8eca706cc 100644 --- a/rpcs3/Loader/PSF.h +++ b/rpcs3/Loader/PSF.h @@ -37,7 +37,7 @@ struct PsfEntry return FormatString(); case 0x0404: - return wxString::Format("0x%x", FormatInteger()).mb_str(); + return wxString::Format("0x%x", FormatInteger()).ToStdString(); } }