mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-01-09 06:23:21 +08:00
Optimisation of the smart pointer in PSPLoader and ISOFileSystem
This commit is contained in:
parent
a7e7b9161a
commit
1928361085
@ -106,7 +106,7 @@ private:
|
||||
// the filenames to "", to achieve this.
|
||||
class ISOBlockSystem : public IFileSystem {
|
||||
public:
|
||||
ISOBlockSystem(std::shared_ptr<IFileSystem> isoFileSystem) : isoFileSystem_(isoFileSystem) {}
|
||||
ISOBlockSystem(std::shared_ptr<IFileSystem> isoFileSystem) : isoFileSystem_(std::move(isoFileSystem)) {}
|
||||
|
||||
void DoState(PointerWrap &p) override {
|
||||
// This is a bit iffy, as block device savestates already are iffy (loads/saves multiple times for multiple mounts..)
|
||||
|
||||
@ -92,9 +92,8 @@ void InitMemoryForGameISO(FileLoader *fileLoader) {
|
||||
if (!bd)
|
||||
return;
|
||||
|
||||
auto iso = std::make_shared<ISOFileSystem>(&pspFileSystem, bd);
|
||||
fileSystem = iso;
|
||||
blockSystem = std::make_shared<ISOBlockSystem>(iso);
|
||||
fileSystem = std::make_shared<ISOFileSystem>(&pspFileSystem, bd);
|
||||
blockSystem = std::make_shared<ISOBlockSystem>(fileSystem);
|
||||
}
|
||||
|
||||
pspFileSystem.Mount("umd0:", blockSystem);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user