mount host_folder to guest_folder
This commit is contained in:
parent
6bd5bfd500
commit
51260ca6ce
|
@ -1,7 +1,15 @@
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
|
|
||||||
namespace Emulator::Host::Fs {
|
namespace Emulator::Host::Fs {
|
||||||
void MntPoints::mount(const std::string& host_folder, const std::string& quest_folder) {}
|
void MntPoints::mount(const std::string& host_folder, const std::string& guest_folder) {
|
||||||
|
Lib::LockMutexGuard lock(m_mutex);
|
||||||
|
|
||||||
|
MntPair pair;
|
||||||
|
pair.host_path = host_folder;
|
||||||
|
pair.guest_path = guest_folder;
|
||||||
|
|
||||||
|
m_mnt_pairs.push_back(pair);
|
||||||
|
}
|
||||||
void MntPoints::unMount(const std::string& path) {}
|
void MntPoints::unMount(const std::string& path) {}
|
||||||
void MntPoints::unMountAll() {}
|
void MntPoints::unMountAll() {}
|
||||||
} // namespace Emulator::Host::Fs
|
} // namespace Emulator::Host::Fs
|
|
@ -21,7 +21,7 @@ class MntPoints {
|
||||||
|
|
||||||
MntPoints() {}
|
MntPoints() {}
|
||||||
virtual ~MntPoints() {}
|
virtual ~MntPoints() {}
|
||||||
void mount(const std::string& host_folder, const std::string& quest_folder);
|
void mount(const std::string& host_folder, const std::string& guest_folder);
|
||||||
void unMount(const std::string& path);
|
void unMount(const std::string& path);
|
||||||
void unMountAll();
|
void unMountAll();
|
||||||
|
|
||||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <filesystem>
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "imgui_impl_opengl3.h"
|
#include "imgui_impl_opengl3.h"
|
||||||
#include "imgui_impl_sdl3.h"
|
#include "imgui_impl_sdl3.h"
|
||||||
|
@ -35,7 +35,8 @@
|
||||||
#include "Core/PS4/HLE/Libs.h"
|
#include "Core/PS4/HLE/Libs.h"
|
||||||
#include "Core/PS4/Linker.h"
|
#include "Core/PS4/Linker.h"
|
||||||
#include "Lib/Threads.h"
|
#include "Lib/Threads.h"
|
||||||
#include "Emulator/Util\singleton.h"
|
#include "Emulator\Util\singleton.h"
|
||||||
|
#include "Emulator\Host\fs.h"
|
||||||
#include "discord.h"
|
#include "discord.h"
|
||||||
|
|
||||||
// Main code
|
// Main code
|
||||||
|
@ -51,9 +52,12 @@ int main(int argc, char* argv[]) {
|
||||||
Emu::emuInit(width, height);
|
Emu::emuInit(width, height);
|
||||||
HLE::Libs::Graphics::VideoOut::videoOutInit(width, height);
|
HLE::Libs::Graphics::VideoOut::videoOutInit(width, height);
|
||||||
Lib::InitThreads();
|
Lib::InitThreads();
|
||||||
|
|
||||||
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 = singleton<Emulator::Host::Fs::MntPoints>::instance();
|
||||||
|
std::filesystem::path p = std::string(path);
|
||||||
|
mnt->mount(p.parent_path().string(), "/app0");
|
||||||
|
|
||||||
auto* linker = singleton<Linker>::instance();
|
auto* linker = singleton<Linker>::instance();
|
||||||
HLE::Libs::Init_HLE_Libs(linker->getHLESymbols());
|
HLE::Libs::Init_HLE_Libs(linker->getHLESymbols());
|
||||||
auto* module = linker->LoadModule(path); // load main executable
|
auto* module = linker->LoadModule(path); // load main executable
|
||||||
|
|
Loading…
Reference in New Issue