mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
InputCommon: When using dynamic input textures, only call force reload textures once for packs that have multiple configurations
This commit is contained in:
@ -10,9 +10,11 @@
|
||||
#include "Common/FileSearch.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
|
||||
#include "InputCommon/DynamicInputTextureConfiguration.h"
|
||||
#include "VideoCommon/HiresTextures.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
|
||||
namespace InputCommon
|
||||
{
|
||||
@ -41,9 +43,13 @@ void DynamicInputTextureManager::Load()
|
||||
void DynamicInputTextureManager::GenerateTextures(const IniFile::Section* sec,
|
||||
const std::string& controller_name)
|
||||
{
|
||||
bool any_dirty = false;
|
||||
for (const auto& configuration : m_configuration)
|
||||
{
|
||||
configuration.GenerateTextures(sec, controller_name);
|
||||
any_dirty |= configuration.GenerateTextures(sec, controller_name);
|
||||
}
|
||||
|
||||
if (any_dirty && g_renderer && Core::GetState() != Core::State::Starting)
|
||||
g_renderer->ForceReloadTextures();
|
||||
}
|
||||
} // namespace InputCommon
|
||||
|
Reference in New Issue
Block a user