mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user