mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-11-18 09:46:19 -06:00
VideoCommon: error if the same asset id is used with a different type
This commit is contained in:
@@ -26,6 +26,9 @@ CustomAsset::TimeType TextureDataResource::GetLoadTime() const
|
||||
|
||||
Resource::TaskComplete TextureDataResource::CollectPrimaryData()
|
||||
{
|
||||
if (!m_texture_asset) [[unlikely]]
|
||||
return Resource::TaskComplete::Error;
|
||||
|
||||
const auto last_load_time = m_texture_asset->GetLastLoadedTime();
|
||||
const auto asset = m_texture_asset->GetData();
|
||||
if (!asset)
|
||||
@@ -38,11 +41,15 @@ Resource::TaskComplete TextureDataResource::CollectPrimaryData()
|
||||
|
||||
void TextureDataResource::MarkAsActive()
|
||||
{
|
||||
if (!m_texture_asset) [[unlikely]]
|
||||
return;
|
||||
m_resource_context.asset_cache->MarkAssetActive(m_texture_asset);
|
||||
}
|
||||
|
||||
void TextureDataResource::MarkAsPending()
|
||||
{
|
||||
if (!m_texture_asset) [[unlikely]]
|
||||
return;
|
||||
m_resource_context.asset_cache->MarkAssetPending(m_texture_asset);
|
||||
}
|
||||
} // namespace VideoCommon
|
||||
|
||||
Reference in New Issue
Block a user