mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Core: Load custom textures after inputs has been loaded and avoid sending force texture reload during startup for dynamic textures. This ensures that custom texture loading only happens once and users don't see any weird flashes on startup
This commit is contained in:
parent
fd3af4c5d3
commit
4fff04db3c
3 changed files with 9 additions and 1 deletions
|
@ -79,6 +79,7 @@
|
||||||
|
|
||||||
#include "VideoCommon/AsyncRequests.h"
|
#include "VideoCommon/AsyncRequests.h"
|
||||||
#include "VideoCommon/Fifo.h"
|
#include "VideoCommon/Fifo.h"
|
||||||
|
#include "VideoCommon/HiresTextures.h"
|
||||||
#include "VideoCommon/OnScreenDisplay.h"
|
#include "VideoCommon/OnScreenDisplay.h"
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
#include "VideoCommon/VideoBackendBase.h"
|
#include "VideoCommon/VideoBackendBase.h"
|
||||||
|
@ -542,6 +543,10 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Inputs loading may have generated custom dynamic textures
|
||||||
|
// it's now ok to initialize any custom textures
|
||||||
|
HiresTexture::Update();
|
||||||
|
|
||||||
AudioCommon::InitSoundStream();
|
AudioCommon::InitSoundStream();
|
||||||
Common::ScopeGuard audio_guard{&AudioCommon::ShutdownSoundStream};
|
Common::ScopeGuard audio_guard{&AudioCommon::ShutdownSoundStream};
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "Common/Logging/Log.h"
|
#include "Common/Logging/Log.h"
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
|
#include "Core/Core.h"
|
||||||
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
#include "InputCommon/ControllerEmu/ControllerEmu.h"
|
||||||
#include "InputCommon/ImageOperations.h"
|
#include "InputCommon/ImageOperations.h"
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
|
@ -259,6 +260,8 @@ void DynamicInputTextureConfiguration::GenerateTextures(const IniFile::Section*
|
||||||
|
|
||||||
if (!any_dirty)
|
if (!any_dirty)
|
||||||
return;
|
return;
|
||||||
|
if (Core::GetState() == Core::State::Starting)
|
||||||
|
return;
|
||||||
if (!g_renderer)
|
if (!g_renderer)
|
||||||
return;
|
return;
|
||||||
g_renderer->ForceReloadTextures();
|
g_renderer->ForceReloadTextures();
|
||||||
|
|
|
@ -51,7 +51,7 @@ static std::thread s_prefetcher;
|
||||||
|
|
||||||
void HiresTexture::Init()
|
void HiresTexture::Init()
|
||||||
{
|
{
|
||||||
Update();
|
// Note: Update is not called here so that we handle dynamic textures on startup more gracefully
|
||||||
}
|
}
|
||||||
|
|
||||||
void HiresTexture::Shutdown()
|
void HiresTexture::Shutdown()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue