summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/InputProfile.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2021-02-27 16:41:50 -0600
committeriwubcode <iwubcode@users.noreply.github.com>2021-02-27 17:29:48 -0600
commit32d584a0f5f58ff80ab9ad95ff3d1b10e30d108f (patch)
tree61844ca761f13be9299b3f47f4b6eb0e7ba17130 /Source/Core/InputCommon/InputProfile.cpp
parent158674c274228fc88cec318959d28a3661126a99 (diff)
InputCommon: reduce number of image loads and texture cache invalidations by only running dynamic input textures once for all controllers
Diffstat (limited to 'Source/Core/InputCommon/InputProfile.cpp')
-rw-r--r--Source/Core/InputCommon/InputProfile.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/InputProfile.cpp b/Source/Core/InputCommon/InputProfile.cpp
index 9037d79044..c48d50dae3 100644
--- a/Source/Core/InputCommon/InputProfile.cpp
+++ b/Source/Core/InputCommon/InputProfile.cpp
@@ -73,7 +73,8 @@ std::string ProfileCycler::GetProfile(CycleDirection cycle_direction, int& profi
}
void ProfileCycler::UpdateToProfile(const std::string& profile_filename,
- ControllerEmu::EmulatedController* controller)
+ ControllerEmu::EmulatedController* controller,
+ InputConfig* device_configuration)
{
std::string base;
SplitPath(profile_filename, nullptr, &base, nullptr);
@@ -86,6 +87,7 @@ void ProfileCycler::UpdateToProfile(const std::string& profile_filename,
display_message_ms);
controller->LoadConfig(ini_file.GetOrCreateSection("Profile"));
controller->UpdateReferences(g_controller_interface);
+ device_configuration->GenerateControllerTextures(ini_file);
}
else
{
@@ -129,7 +131,7 @@ void ProfileCycler::CycleProfile(CycleDirection cycle_direction, InputConfig* de
auto* controller = device_configuration->GetController(controller_index);
if (controller)
{
- UpdateToProfile(profile, controller);
+ UpdateToProfile(profile, controller, device_configuration);
}
else
{
@@ -168,7 +170,7 @@ void ProfileCycler::CycleProfileForGame(CycleDirection cycle_direction,
auto* controller = device_configuration->GetController(controller_index);
if (controller)
{
- UpdateToProfile(profile, controller);
+ UpdateToProfile(profile, controller, device_configuration);
}
else
{