initial fs implementation (mounting /app0/)

This commit is contained in:
georgemoralis 2023-11-19 10:22:46 +02:00
parent 3e8cd57986
commit 093ebb568c
4 changed files with 153 additions and 1 deletions

View file

@ -17,6 +17,7 @@
#include "emuTimer.h"
#include "emulator.h"
#include <core/hle/libraries/libkernel/thread_management.h>
#include "core/file_sys/fs.h"
int main(int argc, char* argv[]) {
if (argc == 1) {
@ -35,6 +36,10 @@ int main(int argc, char* argv[]) {
// Argument 1 is the path of self file to boot
const char* const path = argv[1];
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
std::filesystem::path p = std::string(path);
mnt->mount(p.parent_path().string(), "/app0");
auto linker = Common::Singleton<Core::Linker>::Instance();
Core::Libraries::InitHLELibs(&linker->getHLESymbols());
linker->LoadModule(path);