mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Merge pull request #12240 from iwubcode/material_asset_additional_properties
VideoCommon: add additional data types to material asset
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user