mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-08 08:12:57 +12:00
Decouple data save paths from Emulator
This change allows the frontend to select the appdata and configuration file locations when instantiating the emulator, allowing for more flexibility in placing the files. This also fixes configuration not working in MacOS app bundles, as it will now look for config.toml in the user's "Application Support" directory and default there.
This commit is contained in:
parent
8cc9bfbb36
commit
80d8337592
8 changed files with 50 additions and 57 deletions
|
@ -28,6 +28,8 @@
|
|||
#include "gl/context.h"
|
||||
#endif
|
||||
|
||||
static const std::string EmulatorConfigFilename = "config.toml";
|
||||
|
||||
struct SDL_Window;
|
||||
|
||||
enum class ROMType {
|
||||
|
@ -51,6 +53,8 @@ class Emulator {
|
|||
MiniAudioDevice audioDevice;
|
||||
Cheats cheats;
|
||||
|
||||
std::filesystem::path appDataPath;
|
||||
|
||||
public:
|
||||
static constexpr u32 width = 400;
|
||||
static constexpr u32 height = 240 * 2; // * 2 because 2 screens
|
||||
|
@ -85,7 +89,7 @@ class Emulator {
|
|||
// Used in CPU::runFrame
|
||||
bool frameDone = false;
|
||||
|
||||
Emulator();
|
||||
Emulator(std::vector<std::filesystem::path> configSearchPaths, std::filesystem::path appDataPath);
|
||||
~Emulator();
|
||||
|
||||
void step();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue