mount app0

This commit is contained in:
georgemoralis 2023-11-17 17:38:21 +02:00
parent 379037e2fd
commit c5c7ce0831

View File

@ -17,6 +17,7 @@
#include "core/linker.h" #include "core/linker.h"
#include "emuTimer.h" #include "emuTimer.h"
#include "emulator.h" #include "emulator.h"
#include "core/file_sys/fs.h"
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
if (argc == 1) { if (argc == 1) {
@ -32,10 +33,13 @@ int main(int argc, char* argv[]) {
HLE::Libs::Graphics::VideoOut::videoOutInit(width, height); HLE::Libs::Graphics::VideoOut::videoOutInit(width, height);
Emulator::emuTimer::start(); Emulator::emuTimer::start();
// Argument 1 is the path of self file to boot
// Argument 1 is the path of self file to boot // Argument 1 is the path of self file to boot
const char* const path = argv[1]; // argument 1 is the path of self file to boot const char* const path = argv[1]; // argument 1 is the path of self file to boot
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(); auto linker = Common::Singleton<Core::Linker>::Instance();
Core::Libraries::InitHLELibs(&linker->getHLESymbols()); Core::Libraries::InitHLELibs(&linker->getHLESymbols());
linker->LoadModule(path); linker->LoadModule(path);