[Patcher] Allow loading patches from non-utf8 paths
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "third_party/cpptoml/include/cpptoml.h"
|
||||
#include "third_party/fmt/include/fmt/format.h"
|
||||
#include "xenia/base/assert.h"
|
||||
#include "xenia/base/cvar.h"
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
#define XENIA_CONFIG_H_
|
||||
|
||||
#include <filesystem>
|
||||
#include "third_party/cpptoml/include/cpptoml.h"
|
||||
|
||||
std::shared_ptr<cpptoml::table> ParseFile(
|
||||
const std::filesystem::path& filename);
|
||||
|
||||
namespace config {
|
||||
void SetupConfig(const std::filesystem::path& config_folder);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#include <regex>
|
||||
|
||||
#include "xenia/config.h"
|
||||
#include "xenia/base/cvar.h"
|
||||
#include "xenia/base/filesystem.h"
|
||||
#include "xenia/base/logging.h"
|
||||
@@ -61,7 +62,7 @@ PatchFileEntry PatchDB::ReadPatchFile(const std::filesystem::path& file_path) {
|
||||
std::shared_ptr<cpptoml::table> patch_toml_fields;
|
||||
|
||||
try {
|
||||
patch_toml_fields = cpptoml::parse_file(path_to_utf8(file_path));
|
||||
patch_toml_fields = ParseFile(file_path);
|
||||
} catch (...) {
|
||||
XELOGE("PatchDB: Cannot load patch file: {}", path_to_utf8(file_path));
|
||||
patch_file.title_id = -1;
|
||||
|
||||
Reference in New Issue
Block a user