1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-23 03:02:53 +01:00

Fixed compilation errors.

This commit is contained in:
DH 2014-02-02 22:47:17 +02:00
parent beb19633e9
commit 8ba8d35541
7 changed files with 34 additions and 32 deletions

View File

@ -36,7 +36,7 @@ CPUThread& CPUThreadManager::AddThread(CPUThreadType type)
default: assert(0); 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); m_threads.Add(new_thread);
#ifndef QT_UI #ifndef QT_UI

View File

@ -25,7 +25,7 @@ bool vfsLocalDir::Open(const wxString& path)
{ {
wxString dir_path = path + wxFILE_SEP_PATH + name; 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.name = name;
info.flags |= wxDirExists(dir_path) ? DirEntry_TypeDir : DirEntry_TypeFile; info.flags |= wxDirExists(dir_path) ? DirEntry_TypeDir : DirEntry_TypeFile;

View File

@ -564,6 +564,8 @@ protected:
Reset(); Reset();
} }
virtual ~RSXThread() {}
void Reset() void Reset()
{ {
m_set_color_mask = false; m_set_color_mask = false;

View File

@ -204,21 +204,21 @@ void UnloadModules()
g_modules_funcs_list.Clear(); g_modules_funcs_list.Clear();
} }
Module* GetModuleByName(const wxString& name) Module* GetModuleByName(const std::string& name)
{ {
for(u32 i=0; i<g_max_module_id; ++i) for(u32 i=0; i<g_max_module_id; ++i)
{ {
if(g_modules[0][i] && g_modules[0][i]->GetName().Cmp(name) == 0) if(g_modules[0][i] && g_modules[0][i]->GetName() == name)
{ {
return g_modules[0][i]; 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]; 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]; return g_modules[2][i];
} }
@ -396,12 +396,12 @@ u16 Module::GetID() const
return m_id; return m_id;
} }
wxString Module::GetName() const std::string Module::GetName() const
{ {
return m_name; return m_name;
} }
void Module::SetName(const wxString& name) void Module::SetName(const std::string& name)
{ {
m_name = name; m_name = name;
} }
@ -412,7 +412,7 @@ void Module::Log(const u32 id, wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); 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); va_end(list);
} }
} }
@ -423,7 +423,7 @@ void Module::Log(wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list)); ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list).mb_str());
va_end(list); va_end(list);
} }
} }
@ -432,7 +432,7 @@ void Module::Warning(const u32 id, wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); 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); va_end(list);
} }
@ -440,7 +440,7 @@ void Module::Warning(wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); 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); va_end(list);
} }
@ -448,7 +448,7 @@ void Module::Error(const u32 id, wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); 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); va_end(list);
} }
@ -456,16 +456,16 @@ void Module::Error(wxString fmt, ...)
{ {
va_list list; va_list list;
va_start(list, fmt); 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); va_end(list);
} }
bool Module::CheckID(u32 id) const 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 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();
} }

View File

@ -27,7 +27,7 @@ struct ModuleFunc
class Module class Module
{ {
wxString m_name; std::string m_name;
const u16 m_id; const u16 m_id;
bool m_is_loaded; bool m_is_loaded;
void (*m_load_func)(); void (*m_load_func)();
@ -49,8 +49,8 @@ public:
bool IsLoaded() const; bool IsLoaded() const;
u16 GetID() const; u16 GetID() const;
wxString GetName() const; std::string GetName() const;
void SetName(const wxString& name); void SetName(const std::string& name);
public: public:
void Log(const u32 id, wxString fmt, ...); void Log(const u32 id, wxString fmt, ...);
@ -95,5 +95,5 @@ bool CallFunc(u32 num);
bool UnloadFunc(u32 id); bool UnloadFunc(u32 id);
void UnloadModules(); void UnloadModules();
u32 GetFuncNumById(u32 id); u32 GetFuncNumById(u32 id);
Module* GetModuleByName(const wxString& name); Module* GetModuleByName(const std::string& name);
Module* GetModuleById(u16 id); Module* GetModuleById(u16 id);

View File

@ -17,17 +17,17 @@ extern bool enable_log;
class SysCallBase //Module class SysCallBase //Module
{ {
private: private:
wxString m_module_name; std::string m_module_name;
//u32 m_id; //u32 m_id;
public: public:
SysCallBase(const wxString& name/*, u32 id*/) SysCallBase(const std::string& name/*, u32 id*/)
: m_module_name(name) : m_module_name(name)
//, m_id(id) //, 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, ...) void Log(const u32 id, wxString fmt, ...)
{ {
@ -35,7 +35,7 @@ public:
{ {
va_list list; va_list list;
va_start(list, fmt); 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); va_end(list);
} }
} }
@ -46,7 +46,7 @@ public:
{ {
va_list list; va_list list;
va_start(list, fmt); va_start(list, fmt);
ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list)); ConLog.Write(GetName() + ": " + wxString::FormatV(fmt, list).mb_str());
va_end(list); va_end(list);
} }
} }
@ -56,7 +56,7 @@ public:
//#ifdef SYSCALLS_DEBUG //#ifdef SYSCALLS_DEBUG
va_list list; va_list list;
va_start(list, fmt); 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); va_end(list);
//#endif //#endif
} }
@ -66,7 +66,7 @@ public:
//#ifdef SYSCALLS_DEBUG //#ifdef SYSCALLS_DEBUG
va_list list; va_list list;
va_start(list, fmt); 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); va_end(list);
//#endif //#endif
} }
@ -75,7 +75,7 @@ public:
{ {
va_list list; va_list list;
va_start(list, fmt); 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); va_end(list);
} }
@ -83,13 +83,13 @@ public:
{ {
va_list list; va_list list;
va_start(list, fmt); 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); va_end(list);
} }
bool CheckId(u32 id) const 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<typename T> bool CheckId(u32 id, T*& data) template<typename T> bool CheckId(u32 id, T*& data)
@ -105,7 +105,7 @@ public:
template<> bool CheckId(u32 id, ID*& _id) 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<typename T> template<typename T>

View File

@ -336,7 +336,7 @@ bool ELF64Loader::LoadPhdrData(u64 offset)
stub.s_text = re(stub.s_text); stub.s_text = re(stub.s_text);
const wxString& module_name = Memory.ReadString(stub.s_modulename); const wxString& module_name = Memory.ReadString(stub.s_modulename);
Module* module = GetModuleByName(module_name); Module* module = GetModuleByName(module_name.mb_str());
if(module) if(module)
{ {
//module->SetLoaded(); //module->SetLoaded();