mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
BUGFIX: Add break after NV4097_SET_TEXTURE_BORDER_COLOR in RSXThread.cpp BUGFIX: Fix parameters passed to RSXTexture::SetControl3 (they were being passed in reverse order) BUGFIX: Remove invalid, non-sensical call to glPixelStorei in GLGSRender.h BUGFIX: Fix signed/unsigned comparison compiler warnings in GLGSRender.h CHANGE: Make GLFragmentProgram::Decompiler synchronous by default CHANGE: Update wxWidgets submodule to latest commit BUGFIX: Fix several memory leaks ADDED: Created a new MSVC debug configuration to output locations of allocations that end up leaking after the program is closed. BUGFIX: Fix the stupid PadHandler crash due to the lack of a virtual d'tor
72 lines
2 KiB
C++
72 lines
2 KiB
C++
#pragma once
|
|
|
|
#include "vfsDevice.h"
|
|
|
|
enum vfsDeviceType
|
|
{
|
|
vfsDevice_LocalFile,
|
|
vfsDevice_HDD,
|
|
};
|
|
|
|
static const char* vfsDeviceTypeNames[] =
|
|
{
|
|
"Local",
|
|
"HDD",
|
|
};
|
|
|
|
struct VFSManagerEntry
|
|
{
|
|
vfsDeviceType device;
|
|
std::string device_path;
|
|
std::string path;
|
|
std::string mount;
|
|
|
|
VFSManagerEntry()
|
|
: device(vfsDevice_LocalFile)
|
|
, device_path("")
|
|
, path("")
|
|
, mount("")
|
|
{
|
|
}
|
|
|
|
VFSManagerEntry(const vfsDeviceType& device, const std::string& path, const std::string& mount)
|
|
: device(device)
|
|
, device_path("")
|
|
, path(path)
|
|
, mount(mount)
|
|
|
|
{
|
|
}
|
|
};
|
|
|
|
struct VFS
|
|
{
|
|
~VFS();
|
|
|
|
//TODO: find out where these are supposed to be deleted or just make it shared_ptr
|
|
//and also make GetDevice and GetDeviceLocal return shared_ptr then.
|
|
// A vfsDevice will be deleted when they're unmounted or the VFS struct is destroyed.
|
|
// This will cause problems if other code stores the pointer returned by GetDevice/GetDeviceLocal
|
|
// and tries to use it after the device is unmounted.
|
|
std::vector<vfsDevice *> m_devices;
|
|
void Mount(const std::string& ps3_path, const std::string& local_path, vfsDevice* device);
|
|
void UnMount(const std::string& ps3_path);
|
|
void UnMountAll();
|
|
|
|
vfsFileBase* OpenFile(const std::string& ps3_path, vfsOpenMode mode) const;
|
|
vfsDirBase* OpenDir(const std::string& ps3_path) const;
|
|
bool CreateFile(const std::string& ps3_path) const;
|
|
bool CreateDir(const std::string& ps3_path) const;
|
|
bool RemoveFile(const std::string& ps3_path) const;
|
|
bool RemoveDir(const std::string& ps3_path) const;
|
|
bool ExistsFile(const std::string& ps3_path) const;
|
|
bool ExistsDir(const std::string& ps3_path) const;
|
|
bool RenameFile(const std::string& ps3_path_from, const std::string& ps3_path_to) const;
|
|
bool RenameDir(const std::string& ps3_path_from, const std::string& ps3_path_to) const;
|
|
|
|
vfsDevice* GetDevice(const std::string& ps3_path, std::string& path) const;
|
|
vfsDevice* GetDeviceLocal(const std::string& local_path, std::string& path) const;
|
|
|
|
void Init(const std::string& path);
|
|
void SaveLoadDevices(std::vector<VFSManagerEntry>& res, bool is_load);
|
|
};
|