mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
Fix configuration file path on Android
This commit is contained in:
parent
7a78b2cf20
commit
070d5b1c6d
5 changed files with 41 additions and 13 deletions
|
@ -17,7 +17,9 @@ struct EmulatorConfig {
|
|||
// Default to 3% battery to make users suffer
|
||||
int batteryPercentage = 3;
|
||||
|
||||
std::filesystem::path filePath;
|
||||
|
||||
EmulatorConfig(const std::filesystem::path& path);
|
||||
void load(const std::filesystem::path& path);
|
||||
void save(const std::filesystem::path& path);
|
||||
void load();
|
||||
void save();
|
||||
};
|
|
@ -122,4 +122,7 @@ class Emulator {
|
|||
RendererType getRendererType() const { return config.rendererType; }
|
||||
Renderer* getRenderer() { return gpu.getRenderer(); }
|
||||
u64 getTicks() { return cpu.getTicks(); }
|
||||
|
||||
std::filesystem::path getConfigPath();
|
||||
std::filesystem::path getAndroidAppPath();
|
||||
};
|
||||
|
|
|
@ -90,6 +90,13 @@ namespace Helpers {
|
|||
return false;
|
||||
}
|
||||
|
||||
static constexpr bool isAndroid() {
|
||||
#ifdef __ANDROID__
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
static void debug_printf(const char* fmt, ...) {
|
||||
if constexpr (buildingInDebugMode()) {
|
||||
std::va_list args;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue