summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Assets/CustomAsset.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2025-03-01 22:16:09 -0600
committeriwubcode <iwubcode@users.noreply.github.com>2025-06-06 19:20:25 -0500
commit9ec69b5925ea4230077e7f77795b7a0f7a05e963 (patch)
treed3d9b27fa4503e4843f077bc64270290c5a5f2c5 /Source/Core/VideoCommon/Assets/CustomAsset.cpp
parentd7de49ccf68aae6b3c12e35122435f30ea2f8533 (diff)
VideoCommon: add a handle to custom asset, this is an id that is only relevant for a particular game session but is slightly faster as a numeric value for lookups than the traditional asset id
Diffstat (limited to 'Source/Core/VideoCommon/Assets/CustomAsset.cpp')
-rw-r--r--Source/Core/VideoCommon/Assets/CustomAsset.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Assets/CustomAsset.cpp b/Source/Core/VideoCommon/Assets/CustomAsset.cpp
index 1591f93f91..c06b184b7f 100644
--- a/Source/Core/VideoCommon/Assets/CustomAsset.cpp
+++ b/Source/Core/VideoCommon/Assets/CustomAsset.cpp
@@ -6,8 +6,8 @@
namespace VideoCommon
{
CustomAsset::CustomAsset(std::shared_ptr<CustomAssetLibrary> library,
- const CustomAssetLibrary::AssetID& asset_id)
- : m_owning_library(std::move(library)), m_asset_id(asset_id)
+ const CustomAssetLibrary::AssetID& asset_id, u64 asset_handle)
+ : m_owning_library(std::move(library)), m_asset_id(asset_id), m_handle(asset_handle)
{
}
@@ -34,6 +34,11 @@ const CustomAssetLibrary::TimeType& CustomAsset::GetLastLoadedTime() const
return m_last_loaded_time;
}
+std::size_t CustomAsset::GetHandle() const
+{
+ return m_handle;
+}
+
const CustomAssetLibrary::AssetID& CustomAsset::GetAssetId() const
{
return m_asset_id;