mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +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
|
@ -31,8 +31,7 @@ public:
|
|||
template <typename T, typename... Args>
|
||||
void CreateController(Args&&... args)
|
||||
{
|
||||
OnControllerCreated(
|
||||
*m_controllers.emplace_back(std::make_unique<T>(std::forward<Args>(args)...)));
|
||||
m_controllers.emplace_back(std::make_unique<T>(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
ControllerEmu::EmulatedController* GetController(int index);
|
||||
|
@ -48,8 +47,9 @@ public:
|
|||
void RegisterHotplugCallback();
|
||||
void UnregisterHotplugCallback();
|
||||
|
||||
void GenerateControllerTextures(const IniFile& file);
|
||||
|
||||
private:
|
||||
void OnControllerCreated(ControllerEmu::EmulatedController& controller);
|
||||
ControllerInterface::HotplugCallbackHandle m_hotplug_callback_handle;
|
||||
std::vector<std::unique_ptr<ControllerEmu::EmulatedController>> m_controllers;
|
||||
const std::string m_ini_name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue