Core / VideoCommon: update HiresTexture to use CustomAssetLoader

This commit is contained in:
iwubcode
2023-03-20 01:23:51 -05:00
parent 5738646e3e
commit f1f1ecc9d1
5 changed files with 106 additions and 318 deletions

View File

@ -83,10 +83,10 @@
#include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "InputCommon/GCAdapter.h"
#include "VideoCommon/Assets/CustomAssetLoader.h"
#include "VideoCommon/AsyncRequests.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/FrameDumper.h"
#include "VideoCommon/HiresTextures.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/PerformanceMetrics.h"
#include "VideoCommon/Present.h"
@ -530,6 +530,9 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
FreeLook::LoadInputConfig();
system.GetCustomAssetLoader().Init();
Common::ScopeGuard asset_loader_guard([&system] { system.GetCustomAssetLoader().Shutdown(); });
Movie::Init(*boot);
Common::ScopeGuard movie_guard{&Movie::Shutdown};
@ -581,10 +584,6 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
return;
}
// Inputs loading may have generated custom dynamic textures
// it's now ok to initialize any custom textures
HiresTexture::Update();
AudioCommon::PostInitSoundStream(system);
// The hardware is initialized.