mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-21 01:31:39 +00:00
InputCommon: reduce number of image loads and texture cache invalidations by only running dynamic input textures once for all controllers
This commit is contained in:
parent
158674c274
commit
32d584a0f5
10 changed files with 117 additions and 123 deletions
|
@ -112,12 +112,6 @@ void EmulatedController::SetDefaultDevice(ciface::Core::DeviceQualifier devq)
|
|||
}
|
||||
}
|
||||
|
||||
void EmulatedController::SetDynamicInputTextureManager(
|
||||
InputCommon::DynamicInputTextureManager* dynamic_input_tex_config_manager)
|
||||
{
|
||||
m_dynamic_input_tex_config_manager = dynamic_input_tex_config_manager;
|
||||
}
|
||||
|
||||
void EmulatedController::LoadConfig(IniFile::Section* sec, const std::string& base)
|
||||
{
|
||||
std::string defdev = GetDefaultDevice().ToString();
|
||||
|
@ -129,11 +123,6 @@ void EmulatedController::LoadConfig(IniFile::Section* sec, const std::string& ba
|
|||
|
||||
for (auto& cg : groups)
|
||||
cg->LoadConfig(sec, defdev, base);
|
||||
|
||||
if (base.empty())
|
||||
{
|
||||
GenerateTextures(sec);
|
||||
}
|
||||
}
|
||||
|
||||
void EmulatedController::SaveConfig(IniFile::Section* sec, const std::string& base)
|
||||
|
@ -144,11 +133,6 @@ void EmulatedController::SaveConfig(IniFile::Section* sec, const std::string& ba
|
|||
|
||||
for (auto& ctrlGroup : groups)
|
||||
ctrlGroup->SaveConfig(sec, defdev, base);
|
||||
|
||||
if (base.empty())
|
||||
{
|
||||
GenerateTextures(sec);
|
||||
}
|
||||
}
|
||||
|
||||
void EmulatedController::LoadDefaults(const ControllerInterface& ciface)
|
||||
|
@ -163,12 +147,4 @@ void EmulatedController::LoadDefaults(const ControllerInterface& ciface)
|
|||
SetDefaultDevice(default_device_string);
|
||||
}
|
||||
}
|
||||
|
||||
void EmulatedController::GenerateTextures(IniFile::Section* sec)
|
||||
{
|
||||
if (m_dynamic_input_tex_config_manager)
|
||||
{
|
||||
m_dynamic_input_tex_config_manager->GenerateTextures(sec, GetName());
|
||||
}
|
||||
}
|
||||
} // namespace ControllerEmu
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue