mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 15:05:59 +00:00
initial start to eliminate static func init, not compilable atm
move module initialization into a module manager, still has some issues like stopping not working and debug crashing add #idef 0 to modules that aren't in the windows project don't double initialize and don't de-initialize for now, since many modules don't expect it and it leads to many errors remove duplicate module lists for empty modules and implemented ones, make Module non-copyable but movable add secondary project, no real use for it now add some memleak config to the emucore and add asmjit path to rpcs3 small rebase error fixed to get it to compile again add filters for emucore re-add the module manager and static file WIP commit, linker errors abound some more abstraction layer stuff fix the remaining linker errors, re-enable platform specific mouse, pad and keyboard handlers rebasing fix memset undefined and re() usage of se_t before declaration Add wxGUI define by default for cmake builds fix copy constructors of Datetime header fix copy constructors of other wx interface classes remove static declarations of global variables make wxGLCanvas constructor non-ambiguous even with wx2.8. compat mode, fix wrong std::exception constructor calls remove duplicate definition for FromUTF8 and ToUTF8 temp changes
This commit is contained in:
parent
c4e3ec825e
commit
c37905e465
156 changed files with 6567 additions and 4611 deletions
|
|
@ -2,30 +2,30 @@
|
|||
#include "Emu/ConLog.h"
|
||||
#include "vfsLocalFile.h"
|
||||
|
||||
static const wxFile::OpenMode vfs2wx_mode(vfsOpenMode mode)
|
||||
static const rFile::OpenMode vfs2wx_mode(vfsOpenMode mode)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case vfsRead: return wxFile::read;
|
||||
case vfsWrite: return wxFile::write;
|
||||
case vfsReadWrite: return wxFile::read_write;
|
||||
case vfsWriteExcl: return wxFile::write_excl;
|
||||
case vfsWriteAppend: return wxFile::write_append;
|
||||
case vfsRead: return rFile::read;
|
||||
case vfsWrite: return rFile::write;
|
||||
case vfsReadWrite: return rFile::read_write;
|
||||
case vfsWriteExcl: return rFile::write_excl;
|
||||
case vfsWriteAppend: return rFile::write_append;
|
||||
}
|
||||
|
||||
return wxFile::read;
|
||||
return rFile::read;
|
||||
}
|
||||
|
||||
static const wxSeekMode vfs2wx_seek(vfsSeekMode mode)
|
||||
static const rSeekMode vfs2wx_seek(vfsSeekMode mode)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case vfsSeekSet: return wxFromStart;
|
||||
case vfsSeekCur: return wxFromCurrent;
|
||||
case vfsSeekEnd: return wxFromEnd;
|
||||
case vfsSeekSet: return rFromStart;
|
||||
case vfsSeekCur: return rFromCurrent;
|
||||
case vfsSeekEnd: return rFromEnd;
|
||||
}
|
||||
|
||||
return wxFromStart;
|
||||
return rFromStart;
|
||||
}
|
||||
|
||||
vfsLocalFile::vfsLocalFile(vfsDevice* device) : vfsFileBase(device)
|
||||
|
|
@ -45,9 +45,9 @@ bool vfsLocalFile::Open(const std::string& path, vfsOpenMode mode)
|
|||
// }
|
||||
// else
|
||||
// {
|
||||
if(!m_file.Access(fmt::FromUTF8(path), vfs2wx_mode(mode))) return false;
|
||||
if(!m_file.Access(path, vfs2wx_mode(mode))) return false;
|
||||
|
||||
return m_file.Open(fmt::FromUTF8(path), vfs2wx_mode(mode)) && vfsFileBase::Open(path, mode);
|
||||
return m_file.Open(path, vfs2wx_mode(mode)) && vfsFileBase::Open(path, mode);
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
@ -63,19 +63,19 @@ bool vfsLocalFile::Create(const std::string& path)
|
|||
break;
|
||||
|
||||
const std::string& dir = path.substr(0, p);
|
||||
if(!wxDirExists(fmt::FromUTF8(dir)))
|
||||
if(!rDirExists(dir))
|
||||
{
|
||||
ConLog.Write("create dir: %s", dir.c_str());
|
||||
wxMkdir(fmt::FromUTF8(dir));
|
||||
rMkdir(dir);
|
||||
}
|
||||
}
|
||||
|
||||
//create file
|
||||
const char m = path[path.length() - 1];
|
||||
if(m != '/' && m != '\\' && !wxFileExists(fmt::FromUTF8(path))) // ???
|
||||
if(m != '/' && m != '\\' && !rFileExists(path)) // ???
|
||||
{
|
||||
wxFile f;
|
||||
return f.Create(fmt::FromUTF8(path));
|
||||
rFile f;
|
||||
return f.Create(path);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue