mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
InputCommon / VideoCommon: update to use new JsonFromFile function
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/FileSearch.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/JsonUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
@ -42,17 +43,9 @@ void GraphicsModGroupConfig::Load()
|
||||
std::set<std::string> known_paths;
|
||||
if (File::Exists(file_path))
|
||||
{
|
||||
std::string json_data;
|
||||
if (!File::ReadFileToString(file_path, json_data))
|
||||
{
|
||||
ERROR_LOG_FMT(VIDEO, "Failed to load graphics mod group json file '{}'", file_path);
|
||||
return;
|
||||
}
|
||||
|
||||
picojson::value root;
|
||||
const auto error = picojson::parse(root, json_data);
|
||||
|
||||
if (!error.empty())
|
||||
std::string error;
|
||||
if (!JsonFromFile(file_path, &root, &error))
|
||||
{
|
||||
ERROR_LOG_FMT(VIDEO,
|
||||
"Failed to load graphics mod group json file '{}' due to parse error: {}",
|
||||
|
Reference in New Issue
Block a user