summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/GraphicsModSystem
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/GraphicsModSystem')
-rw-r--r--Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
index 267f88bb4c..0a51bb995e 100644
--- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
+++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
@@ -393,21 +393,15 @@ void CustomPipelineAction::OnTextureCreate(GraphicsModActionData::TextureCreate*
return;
}
- if (property.m_type == VideoCommon::MaterialProperty::Type::Type_TextureAsset)
+ if (auto* value = std::get_if<std::string>(&property.m_value))
{
- if (property.m_value)
+ auto asset = loader.LoadGameTexture(*value, m_library);
+ if (asset)
{
- if (auto* value = std::get_if<std::string>(&*property.m_value))
- {
- auto asset = loader.LoadGameTexture(*value, m_library);
- if (asset)
- {
- const auto loaded_time = asset->GetLastLoadedTime();
- game_assets.push_back(VideoCommon::CachedAsset<VideoCommon::GameTextureAsset>{
- std::move(asset), loaded_time});
- m_texture_code_names.push_back(property.m_code_name);
- }
- }
+ const auto loaded_time = asset->GetLastLoadedTime();
+ game_assets.push_back(
+ VideoCommon::CachedAsset<VideoCommon::GameTextureAsset>{std::move(asset), loaded_time});
+ m_texture_code_names.push_back(property.m_code_name);
}
}
}