mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
VideoCommon: add 'Unload' functionality to CustomAsset
This commit is contained in:
parent
9ec69b5925
commit
316740daed
2 changed files with 25 additions and 0 deletions
|
@ -23,6 +23,18 @@ bool CustomAsset::Load()
|
|||
return load_information.m_bytes_loaded != 0;
|
||||
}
|
||||
|
||||
std::size_t CustomAsset::Unload()
|
||||
{
|
||||
UnloadImpl();
|
||||
std::size_t bytes_loaded = 0;
|
||||
{
|
||||
std::lock_guard lk(m_info_lock);
|
||||
bytes_loaded = m_bytes_loaded;
|
||||
m_bytes_loaded = 0;
|
||||
}
|
||||
return bytes_loaded;
|
||||
}
|
||||
|
||||
CustomAssetLibrary::TimeType CustomAsset::GetLastWriteTime() const
|
||||
{
|
||||
return m_owning_library->GetLastAssetWriteTime(m_asset_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue