InputCommon: Introducing the "Dynamic Input Texture". Configuration links an emulated input action to an image based on what host key is defined for that emulated input. Specific regions are called out in configuration that mark where to replace an input button with a host key image.

This commit is contained in:
iwubcode
2019-08-17 14:40:58 -05:00
parent 8a1539f948
commit fd3af4c5d3
24 changed files with 1114 additions and 9 deletions

View File

@ -10,6 +10,7 @@
#include <vector>
#include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "InputCommon/DynamicInputTextureManager.h"
namespace ControllerEmu
{
@ -30,7 +31,8 @@ public:
template <typename T, typename... Args>
void CreateController(Args&&... args)
{
m_controllers.emplace_back(std::make_unique<T>(std::forward<Args>(args)...));
OnControllerCreated(
*m_controllers.emplace_back(std::make_unique<T>(std::forward<Args>(args)...)));
}
ControllerEmu::EmulatedController* GetController(int index);
@ -47,9 +49,11 @@ public:
void UnregisterHotplugCallback();
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;
const std::string m_gui_name;
const std::string m_profile_name;
InputCommon::DynamicInputTextureManager m_dynamic_input_tex_config_manager;
};