diff --git a/include/emulator.hpp b/include/emulator.hpp index de04648e..66aeb27e 100644 --- a/include/emulator.hpp +++ b/include/emulator.hpp @@ -87,6 +87,7 @@ class Emulator { bool frameDone = false; Emulator(); + Emulator(const std::filesystem::path& configPath); ~Emulator(); void step(); @@ -129,10 +130,10 @@ class Emulator { Renderer* getRenderer() { return gpu.getRenderer(); } u64 getTicks() { return cpu.getTicks(); } - std::filesystem::path getConfigPath(); - std::filesystem::path getAndroidAppPath(); + virtual std::filesystem::path getConfigPath(); + virtual std::filesystem::path getAndroidAppPath(); // Get the root path for the emulator's app data - std::filesystem::path getAppDataRoot(); + virtual std::filesystem::path getAppDataRoot(); std::span getSMDH(); }; diff --git a/src/emulator.cpp b/src/emulator.cpp index af156eeb..a7d859be 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -17,7 +17,10 @@ __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 1; #endif Emulator::Emulator() - : config(getConfigPath()), kernel(cpu, memory, gpu, config), cpu(memory, kernel, *this), gpu(memory, config), memory(cpu.getTicksRef(), config), + : Emulator(getConfigPath()) {} + +Emulator::Emulator(const std::filesystem::path& configPath) + : config(configPath), kernel(cpu, memory, gpu, config), cpu(memory, kernel, *this), gpu(memory, config), memory(cpu.getTicksRef(), config), cheats(memory, kernel.getServiceManager().getHID()), lua(*this), running(false) #ifdef PANDA3DS_ENABLE_HTTP_SERVER ,