mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-03 16:49:04 +00:00
Add version check
This commit is contained in:
@@ -899,6 +899,13 @@ std::vector<Config> LoadPresetConfig(std::string mount_point) {
|
||||
LOAD_DATA(system_archives_path, "sysarchives/");
|
||||
LOAD_DATA(system_titles_path, "title/");
|
||||
#undef LOAD_DATA
|
||||
|
||||
// Load version
|
||||
if (FileUtil::Exists(mount_point + "threeSD/version.txt")) {
|
||||
std::ifstream stream;
|
||||
OpenFStream(stream, mount_point + "threeSD/version.txt", std::ios::in);
|
||||
stream >> config_template.version;
|
||||
}
|
||||
}
|
||||
|
||||
// Regex for 3DS ID0 and ID1
|
||||
|
||||
@@ -79,8 +79,13 @@ struct Config {
|
||||
|
||||
std::string system_archives_path; ///< Path to system archives.
|
||||
std::string system_titles_path; ///< Path to system titles.
|
||||
|
||||
int version = 0; ///< Version of the dumper used.
|
||||
};
|
||||
|
||||
// Version of the current dumper.
|
||||
constexpr int CurrentDumperVersion = 1;
|
||||
|
||||
class SDMCFile;
|
||||
|
||||
template <typename File>
|
||||
|
||||
Reference in New Issue
Block a user