mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Add the ability to get partial input group
For hotkeys, changed HotkeyManager to allow to get and make partial groups of hotkeys. Also preserved the old configuration naming scheme for the ini, this is done to preserve compatibility with the older groups structure. Add the ability to get GCPad control groups Used like the HotkeyManager methods, this is used for the new GCPad configuration dialog. Add the ability to get groups of Keyboard input Same reasons as the previous ones. Add ability to get groups of Wiimote input Add the ability to get extensions group This needed to pass to 3 classes. Will be used for their respective dialogs.
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
|
||||
#include "Core/HW/GCKeyboardEmu.h"
|
||||
#include "Common/Common.h"
|
||||
#include "InputCommon/ControllerEmu.h"
|
||||
#include "InputCommon/KeyboardStatus.h"
|
||||
|
||||
static const u16 keys0_bitmasks[] = {KEYMASK_HOME, KEYMASK_END, KEYMASK_PGUP, KEYMASK_PGDN,
|
||||
@ -84,6 +85,29 @@ std::string GCKeyboard::GetName() const
|
||||
return std::string("GCKeyboard") + char('1' + m_index);
|
||||
}
|
||||
|
||||
ControllerEmu::ControlGroup* GCKeyboard::GetGroup(KeyboardGroup group)
|
||||
{
|
||||
switch (group)
|
||||
{
|
||||
case KeyboardGroup::Kb0x:
|
||||
return m_keys0x;
|
||||
case KeyboardGroup::Kb1x:
|
||||
return m_keys1x;
|
||||
case KeyboardGroup::Kb2x:
|
||||
return m_keys2x;
|
||||
case KeyboardGroup::Kb3x:
|
||||
return m_keys3x;
|
||||
case KeyboardGroup::Kb4x:
|
||||
return m_keys4x;
|
||||
case KeyboardGroup::Kb5x:
|
||||
return m_keys5x;
|
||||
case KeyboardGroup::Options:
|
||||
return m_options;
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
KeyboardStatus GCKeyboard::GetInput() const
|
||||
{
|
||||
auto lock = ControllerEmu::GetStateLock();
|
||||
|
Reference in New Issue
Block a user