mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
input: move config getters to base class
This commit is contained in:
parent
35c92723c7
commit
b3a9c8d83f
6 changed files with 26 additions and 59 deletions
|
|
@ -323,6 +323,26 @@ void PadHandlerBase::init_configs()
|
|||
}
|
||||
}
|
||||
|
||||
cfg_pad* PadHandlerBase::get_config(const std::string& pad_id)
|
||||
{
|
||||
int index = 0;
|
||||
|
||||
for (uint i = 0; i < MAX_GAMEPADS; i++)
|
||||
{
|
||||
if (g_cfg_input.player[i]->handler == m_type)
|
||||
{
|
||||
if (g_cfg_input.player[i]->device.to_string() == pad_id)
|
||||
{
|
||||
m_pad_configs[index].from_string(g_cfg_input.player[i]->config.to_string());
|
||||
return &m_pad_configs[index];
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PadHandlerBase::connection PadHandlerBase::get_next_button_press(const std::string& pad_id, const pad_callback& callback, const pad_fail_callback& fail_callback, bool get_blacklist, const std::vector<std::string>& /*buttons*/)
|
||||
{
|
||||
if (get_blacklist)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue