mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-08 02:00:17 -04:00
29 lines
725 B
C++
29 lines
725 B
C++
#include "paths.hpp"
|
|
|
|
#include "session.hpp"
|
|
|
|
namespace randomizer::paths {
|
|
|
|
std::filesystem::path GetRandomizerPath() {
|
|
const char* dataDir = nullptr;
|
|
if (session::svc_mng.host->data_dir(session::svc_mng.mod_ctx, &dataDir) != MOD_OK) {
|
|
session::svc_mng.host->fail(session::svc_mng.mod_ctx, MOD_ERROR, "Failed to get data directory");
|
|
}
|
|
|
|
return dataDir;
|
|
}
|
|
|
|
std::filesystem::path GetRandomizerSettingsPath() {
|
|
return GetRandomizerPath() / "settings.yaml";
|
|
}
|
|
|
|
std::filesystem::path GetRandomizerPreferencesPath() {
|
|
return GetRandomizerPath() / "preferences.yaml";
|
|
}
|
|
|
|
std::filesystem::path GetRandomizerSeedsPath() {
|
|
return GetRandomizerPath() / "seeds";
|
|
}
|
|
|
|
} // namespace randomizer::paths
|