From d9b53b476f2a09e8769c581a56d05979d5d8ab0d Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Fri, 17 Apr 2015 17:05:28 +0300 Subject: [PATCH] Compilation fix 2 --- rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp | 4 +++- rpcs3/Emu/System.cpp | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp b/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp index 2826c7905f..369e70e688 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp @@ -354,6 +354,7 @@ __noinline s32 savedata_op( vfsFile f(sfo_path); PSFLoader psf(f); + f.Close(); std::string dir_local_path; @@ -490,8 +491,9 @@ __noinline s32 savedata_op( { Emu.GetVFS().CreateFile(sfo_path, true); - vfsFile f(sfo_path, vfsWrite); + f.Open(sfo_path, vfsWrite); psf.Save(f); + f.Close(); } // Enter the loop where the save files are read/created/deleted diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 3bfed22962..e156add969 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -212,7 +212,8 @@ void Emulator::Load() } LOG_NOTICE(LOADER, " "); //used to be skip_line - const PSFLoader psf(vfsFile("/app_home/../PARAM.SFO")); + vfsFile f("/app_home/../PARAM.SFO"); + const PSFLoader psf(f); std::string title = psf.GetString("TITLE"); std::string title_id = psf.GetString("TITLE_ID"); LOG_NOTICE(LOADER, "Title: %s", title.c_str()); @@ -222,12 +223,12 @@ void Emulator::Load() SetTitleID(title_id); // bdvd inserting imitation - vfsFile f1("/app_home/../dev_bdvd.path"); - if (f1.IsOpened()) + f.Open("/app_home/../dev_bdvd.path"); + if (f.IsOpened()) { std::string bdvd; - bdvd.resize(f1.GetSize()); - f1.Read(&bdvd[0], bdvd.size()); + bdvd.resize(f.GetSize()); + f.Read(&bdvd[0], bdvd.size()); // load desired /dev_bdvd/ real directory and remount Emu.GetVFS().Mount("/dev_bdvd/", bdvd, new vfsDeviceLocalFile()); @@ -240,7 +241,7 @@ void Emulator::Load() GetVFS().GetDeviceLocal(m_path, m_elf_path); } - vfsFile f(m_elf_path); + f.Open(m_elf_path); if (!f.IsOpened()) {