1
0
Fork 0
forked from eden-emu/eden

general: Get the current process program id directly from the system

This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
This commit is contained in:
Morph 2021-11-03 20:32:26 -04:00
parent 64275dfbf4
commit a6e6a5ac38
21 changed files with 42 additions and 56 deletions
src/core/hle/service/filesystem

View file

@ -20,7 +20,6 @@
#include "core/file_sys/sdmc_factory.h"
#include "core/file_sys/vfs.h"
#include "core/file_sys/vfs_offset.h"
#include "core/hle/kernel/k_process.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/hle/service/filesystem/fsp_ldr.h"
#include "core/hle/service/filesystem/fsp_pr.h"
@ -320,7 +319,7 @@ ResultVal<FileSys::VirtualFile> FileSystemController::OpenRomFSCurrentProcess()
return ResultUnknown;
}
return romfs_factory->OpenCurrentProcess(system.CurrentProcess()->GetProgramID());
return romfs_factory->OpenCurrentProcess(system.GetCurrentProcessProgramID());
}
ResultVal<FileSys::VirtualFile> FileSystemController::OpenPatchedRomFS(
@ -505,7 +504,7 @@ FileSys::SaveDataSize FileSystemController::ReadSaveDataSize(FileSys::SaveDataTy
const auto res = system.GetAppLoader().ReadControlData(nacp);
if (res != Loader::ResultStatus::Success) {
const FileSys::PatchManager pm{system.CurrentProcess()->GetProgramID(),
const FileSys::PatchManager pm{system.GetCurrentProcessProgramID(),
system.GetFileSystemController(),
system.GetContentProvider()};
const auto metadata = pm.GetControlMetadata();