diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-02-12 19:04:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-12 19:04:59 +0100 |
| commit | c3dee1f11cd847a8c0e55838a01c0d194fe0b63d (patch) | |
| tree | a2158ebaa2c3bcc57b8a7b39f39a23a502ffd637 /Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp | |
| parent | efed037c4af882171237b70f47e50359bc5260da (diff) | |
| parent | 20dc4401c5ae6001aa064911c1e5de0d57642ee4 (diff) | |
Merge pull request #11499 from iwubcode/graphics-mod-pass-base-path
VideoCommon: allow graphics mods to have access to the file path where the config exists to load additional files
Diffstat (limited to 'Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp index 8e381cdd87..a100801e8b 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.cpp @@ -8,6 +8,7 @@ #include <variant> #include "Common/Logging/Log.h" +#include "Common/StringUtil.h" #include "Common/VariantUtil.h" #include "Core/ConfigManager.h" @@ -198,7 +199,10 @@ void GraphicsModManager::Load(const GraphicsModGroupConfig& config) const auto create_action = [](const std::string_view& action_name, const picojson::value& json_data, GraphicsModConfig mod_config) -> std::unique_ptr<GraphicsModAction> { - auto action = GraphicsModActionFactory::Create(action_name, json_data); + std::string base_path; + SplitPath(mod_config.GetAbsolutePath(), &base_path, nullptr, nullptr); + + auto action = GraphicsModActionFactory::Create(action_name, json_data, base_path); if (action == nullptr) { return nullptr; |
