VideoCommon: initialize and shutdown the CustomResourceManager when the video thread initializes and shuts down

This commit is contained in:
iwubcode 2025-03-01 21:54:36 -06:00
parent f910c1d934
commit 12d178a8df

View File

@ -41,6 +41,7 @@
#endif
#include "VideoCommon/AbstractGfx.h"
#include "VideoCommon/Assets/CustomResourceManager.h"
#include "VideoCommon/AsyncRequests.h"
#include "VideoCommon/BPStructs.h"
#include "VideoCommon/BoundingBox.h"
@ -341,12 +342,16 @@ bool VideoBackendBase::InitializeShared(std::unique_ptr<AbstractGfx> gfx,
}
g_shader_cache->InitializeShaderCache();
system.GetCustomResourceManager().Initialize();
return true;
}
void VideoBackendBase::ShutdownShared()
{
auto& system = Core::System::GetInstance();
system.GetCustomResourceManager().Shutdown();
g_frame_dumper.reset();
g_presenter.reset();
@ -369,7 +374,6 @@ void VideoBackendBase::ShutdownShared()
m_initialized = false;
auto& system = Core::System::GetInstance();
VertexLoaderManager::Clear();
system.GetFifo().Shutdown();
}