diff --git a/rpcs3/Emu/CPU/CPUThreadManager.cpp b/rpcs3/Emu/CPU/CPUThreadManager.cpp index 3dd17d02d1..b8d7aad82f 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(wxString::Format("%s Thread", new_thread->GetTypeString().mb_str()), new_thread)); + new_thread->SetId(Emu.GetIdManager().GetNewID(wxString::Format("%s Thread", new_thread->GetTypeString().mb_str()).mb_str(), new_thread)); m_threads.Add(new_thread); #ifndef QT_UI diff --git a/rpcs3/Emu/FS/vfsLocalDir.cpp b/rpcs3/Emu/FS/vfsLocalDir.cpp index bfeea4145b..722665c220 100644 --- a/rpcs3/Emu/FS/vfsLocalDir.cpp +++ b/rpcs3/Emu/FS/vfsLocalDir.cpp @@ -25,7 +25,7 @@ bool vfsLocalDir::Open(const wxString& path) { wxString dir_path = path + wxFILE_SEP_PATH + name; - DirEntryInfo& info = m_entryes[m_entryes.Add(new DirEntryInfo())]; + DirEntryInfo& info = m_entryes[m_entryes.Move(new DirEntryInfo())]; info.name = name; info.flags |= wxDirExists(dir_path) ? DirEntry_TypeDir : DirEntry_TypeFile; diff --git a/rpcs3/Emu/GS/RSXThread.h b/rpcs3/Emu/GS/RSXThread.h index 5083e7b8ed..48a84ab651 100644 --- a/rpcs3/Emu/GS/RSXThread.h +++ b/rpcs3/Emu/GS/RSXThread.h @@ -564,6 +564,8 @@ protected: Reset(); } + virtual ~RSXThread() {} + void Reset() { m_set_color_mask = false; diff --git a/rpcs3/Emu/SysCalls/Modules.cpp b/rpcs3/Emu/SysCalls/Modules.cpp index 4d02cd0dc9..04afe0c9fb 100644 --- a/rpcs3/Emu/SysCalls/Modules.cpp +++ b/rpcs3/Emu/SysCalls/Modules.cpp @@ -204,21 +204,21 @@ void UnloadModules() g_modules_funcs_list.Clear(); } -Module* GetModuleByName(const wxString& name) +Module* GetModuleByName(const std::string& name) { for(u32 i=0; iGetName().Cmp(name) == 0) + if(g_modules[0][i] && g_modules[0][i]->GetName() == name) { return g_modules[0][i]; } - if(g_modules[1][i] && g_modules[1][i]->GetName().Cmp(name) == 0) + if(g_modules[1][i] && g_modules[1][i]->GetName() == name) { return g_modules[1][i]; } - if(g_modules[2][i] && g_modules[2][i]->GetName().Cmp(name) == 0) + if(g_modules[2][i] && g_modules[2][i]->GetName() == name) { return g_modules[2][i]; } @@ -396,12 +396,12 @@ u16 Module::GetID() const return m_id; } -wxString Module::GetName() const +std::string Module::GetName() const { return m_name; } -void Module::SetName(const wxString& name) +void Module::SetName(const std::string& name) { m_name = name; } @@ -412,7 +412,7 @@ void Module::Log(const u32 id, wxString fmt, ...) { va_list list; va_start(list, fmt); - ConLog.Write(GetName() + wxString::Format("[%d]: ", id) + wxString::FormatV(fmt, list)); + ConLog.Write(GetName() + wxString::Format("[%d]: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); va_end(list); } } @@ -423,7 +423,7 @@ void Module::Log(wxString fmt, ...) { va_list list; va_start(list, fmt); - ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list)); + ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list).mb_str()); va_end(list); } } @@ -432,7 +432,7 @@ void Module::Warning(const u32 id, wxString fmt, ...) { va_list list; va_start(list, fmt); - ConLog.Warning(GetName() + wxString::Format("[%d] warning: ", id) + wxString::FormatV(fmt, list)); + ConLog.Warning(GetName() + wxString::Format("[%d] warning: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); va_end(list); } @@ -440,7 +440,7 @@ void Module::Warning(wxString fmt, ...) { va_list list; va_start(list, fmt); - ConLog.Warning(GetName() + " warning: " + wxString::FormatV(fmt, list)); + ConLog.Warning(GetName() + " warning: " + wxString::FormatV(fmt, list).mb_str()); va_end(list); } @@ -448,7 +448,7 @@ void Module::Error(const u32 id, wxString fmt, ...) { va_list list; va_start(list, fmt); - ConLog.Error(GetName() + wxString::Format("[%d] error: ", id) + wxString::FormatV(fmt, list)); + ConLog.Error(GetName() + wxString::Format("[%d] error: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); va_end(list); } @@ -456,16 +456,16 @@ void Module::Error(wxString fmt, ...) { va_list list; va_start(list, fmt); - ConLog.Error(GetName() + " error: " + wxString::FormatV(fmt, list)); + ConLog.Error(GetName() + " error: " + wxString::FormatV(fmt, list).mb_str()); va_end(list); } bool Module::CheckID(u32 id) const { - return Emu.GetIdManager().CheckID(id) && !Emu.GetIdManager().GetID(id).m_name.Cmp(GetName()); + return Emu.GetIdManager().CheckID(id) && Emu.GetIdManager().GetID(id).m_name == GetName(); } bool Module::CheckID(u32 id, ID*& _id) const { - return Emu.GetIdManager().CheckID(id) && !(_id = &Emu.GetIdManager().GetID(id))->m_name.Cmp(GetName()); + return Emu.GetIdManager().CheckID(id) && (_id = &Emu.GetIdManager().GetID(id))->m_name == GetName(); } diff --git a/rpcs3/Emu/SysCalls/Modules.h b/rpcs3/Emu/SysCalls/Modules.h index 5b8a497d35..e7e9f28d7f 100644 --- a/rpcs3/Emu/SysCalls/Modules.h +++ b/rpcs3/Emu/SysCalls/Modules.h @@ -27,7 +27,7 @@ struct ModuleFunc class Module { - wxString m_name; + std::string m_name; const u16 m_id; bool m_is_loaded; void (*m_load_func)(); @@ -49,8 +49,8 @@ public: bool IsLoaded() const; u16 GetID() const; - wxString GetName() const; - void SetName(const wxString& name); + std::string GetName() const; + void SetName(const std::string& name); public: void Log(const u32 id, wxString fmt, ...); @@ -95,5 +95,5 @@ bool CallFunc(u32 num); bool UnloadFunc(u32 id); void UnloadModules(); u32 GetFuncNumById(u32 id); -Module* GetModuleByName(const wxString& name); +Module* GetModuleByName(const std::string& name); Module* GetModuleById(u16 id); diff --git a/rpcs3/Emu/SysCalls/SysCalls.h b/rpcs3/Emu/SysCalls/SysCalls.h index 56acf61882..6d760d2a88 100644 --- a/rpcs3/Emu/SysCalls/SysCalls.h +++ b/rpcs3/Emu/SysCalls/SysCalls.h @@ -17,17 +17,17 @@ extern bool enable_log; class SysCallBase //Module { private: - wxString m_module_name; + std::string m_module_name; //u32 m_id; public: - SysCallBase(const wxString& name/*, u32 id*/) + SysCallBase(const std::string& name/*, u32 id*/) : m_module_name(name) //, m_id(id) { } - const wxString& GetName() const { return m_module_name; } + const std::string& GetName() const { return m_module_name; } void Log(const u32 id, wxString fmt, ...) { @@ -35,7 +35,7 @@ public: { va_list list; va_start(list, fmt); - ConLog.Write(GetName() + wxString::Format("[%d]: ", id) + wxString::FormatV(fmt, list)); + ConLog.Write(GetName() + wxString::Format("[%d]: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); va_end(list); } } @@ -46,7 +46,7 @@ public: { va_list list; va_start(list, fmt); - ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list)); + ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list).mb_str()); va_end(list); } } @@ -56,7 +56,7 @@ public: //#ifdef SYSCALLS_DEBUG va_list list; va_start(list, fmt); - ConLog.Warning(GetName() + wxString::Format("[%d] warning: ", id) + wxString::FormatV(fmt, list)); + ConLog.Warning(GetName() + wxString::Format("[%d] warning: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); va_end(list); //#endif } @@ -66,7 +66,7 @@ public: //#ifdef SYSCALLS_DEBUG va_list list; va_start(list, fmt); - ConLog.Warning(GetName() + " warning: " + wxString::FormatV(fmt, list)); + ConLog.Warning(GetName() + " warning: " + wxString::FormatV(fmt, list).mb_str()); va_end(list); //#endif } @@ -75,7 +75,7 @@ public: { va_list list; va_start(list, fmt); - ConLog.Error(GetName() + wxString::Format("[%d] error: ", id) + wxString::FormatV(fmt, list)); + ConLog.Error(GetName() + wxString::Format("[%d] error: ", id).mb_str() + wxString::FormatV(fmt, list).mb_str()); va_end(list); } @@ -83,13 +83,13 @@ public: { va_list list; va_start(list, fmt); - ConLog.Error(GetName() + " error: " + wxString::FormatV(fmt, list)); + ConLog.Error(GetName() + " error: " + wxString::FormatV(fmt, list).mb_str()); va_end(list); } bool CheckId(u32 id) const { - return Emu.GetIdManager().CheckID(id) && !Emu.GetIdManager().GetID(id).m_name.Cmp(GetName()); + return Emu.GetIdManager().CheckID(id) && Emu.GetIdManager().GetID(id).m_name == GetName(); } template bool CheckId(u32 id, T*& data) @@ -105,7 +105,7 @@ public: template<> bool CheckId(u32 id, ID*& _id) { - return Emu.GetIdManager().CheckID(id) && !(_id = &Emu.GetIdManager().GetID(id))->m_name.Cmp(GetName()); + return Emu.GetIdManager().CheckID(id) && (_id = &Emu.GetIdManager().GetID(id))->m_name == GetName(); } template diff --git a/rpcs3/Loader/ELF64.cpp b/rpcs3/Loader/ELF64.cpp index 023fbd052c..d770aa5c91 100644 --- a/rpcs3/Loader/ELF64.cpp +++ b/rpcs3/Loader/ELF64.cpp @@ -336,7 +336,7 @@ bool ELF64Loader::LoadPhdrData(u64 offset) stub.s_text = re(stub.s_text); const wxString& module_name = Memory.ReadString(stub.s_modulename); - Module* module = GetModuleByName(module_name); + Module* module = GetModuleByName(module_name.mb_str()); if(module) { //module->SetLoaded();