services: Pass FileSystemController as reference to services that need it

This commit is contained in:
Zach Hilman 2019-04-22 17:53:58 -04:00
parent 1b04b72653
commit 4b91057688
11 changed files with 47 additions and 20 deletions

View file

@ -1268,7 +1268,7 @@ void IApplicationFunctions::ExtendSaveData(Kernel::HLERequestContext& ctx) {
"new_journal={:016X}",
static_cast<u8>(type), user_id[1], user_id[0], new_normal_size, new_journal_size);
fsc.WriteSaveDataSize(type, Core::CurrentProcess()->GetTitleID(), user_id,
fsc.WriteSaveDataSize(type, system.CurrentProcess()->GetTitleID(), user_id,
{new_normal_size, new_journal_size});
IPC::ResponseBuilder rb{ctx, 4};
@ -1288,7 +1288,8 @@ void IApplicationFunctions::GetSaveDataSize(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_AM, "called with type={:02X}, user_id={:016X}{:016X}", static_cast<u8>(type),
user_id[1], user_id[0]);
const auto size = fsc.ReadSaveDataSize(type, Core::CurrentProcess()->GetTitleID(), user_id);
const auto size = system.FileSystemController().ReadSaveDataSize(
type, system.CurrentProcess()->GetTitleID(), user_id);
IPC::ResponseBuilder rb{ctx, 6};
rb.Push(RESULT_SUCCESS);

View file

@ -106,7 +106,7 @@ private:
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);
rb.PushIpcInterface<IApplicationFunctions>(system);
rb.PushIpcInterface<IApplicationFunctions>(system.FileSystemController());
}
std::shared_ptr<NVFlinger::NVFlinger> nvflinger;

View file

@ -9,6 +9,10 @@
#include "core/hle/service/service.h"
namespace Service {
namespace FileSystem {
class FileSystemController;
}
namespace NVFlinger {
class NVFlinger;
}

View file

@ -95,7 +95,7 @@ private:
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(RESULT_SUCCESS);
rb.PushIpcInterface<IApplicationFunctions>(system);
rb.PushIpcInterface<IApplicationFunctions>(system.FileSystemController());
}
std::shared_ptr<NVFlinger::NVFlinger> nvflinger;

View file

@ -9,6 +9,10 @@
#include "core/hle/service/service.h"
namespace Service {
namespace FileSystem {
class FileSystemController;
}
namespace NVFlinger {
class NVFlinger;
}