misc changes

- Add dumper script
- Fill importer code
- other fixes
This commit is contained in:
zhupengfei
2019-08-26 23:20:02 +08:00
parent 4f5a3effd8
commit d612b9cf37
9 changed files with 340 additions and 22 deletions
+1
View File
@@ -37,3 +37,4 @@
#define BOOTROM9 "boot9.bin"
#define SECRET_SECTOR "sector0x96.bin"
#define MOVABLE_SED "movable.sed"
#define SEED_DB "seeddb.bin"
+4 -1
View File
@@ -665,6 +665,10 @@ std::unordered_map<UserPath, std::string> g_paths;
}
void SetUserPath(const std::string& path) {
if (!g_paths.empty()) {
g_paths.clear();
}
std::string& user_path = g_paths[UserPath::UserDir];
if (!path.empty() && CreateFullPath(path)) {
@@ -717,7 +721,6 @@ const std::string& GetUserPath(UserPath path) {
return g_paths[path];
}
std::size_t WriteStringToFile(bool text_file, const std::string& filename, std::string_view str) {
return IOFile(filename, text_file ? "w" : "wb").WriteString(str);
}