ControllerEmu: Convert Translatability to enum class
This commit is contained in:
1 parent
c8559a7933
commit
527f8e783c
26 files changed
+137
-111
No files matched your search
@@ -17,22 +17,24 @@ static const u16 button_bitmasks[] = {PAD_BUTTON_B, PAD_BUTTON_A, PAD_TRIGGER_
|
||||
|
||||
GBAPad::GBAPad(const unsigned int index) : m_reset_pending(false), m_index(index)
|
||||
{
|
||||
using Translatability = ControllerEmu::Translatability;
|
||||
|
||||
// Buttons
|
||||
groups.emplace_back(m_buttons = new ControllerEmu::Buttons(BUTTONS_GROUP));
|
||||
for (const char* named_button : {B_BUTTON, A_BUTTON, L_BUTTON, R_BUTTON})
|
||||
{
|
||||
m_buttons->AddInput(ControllerEmu::DoNotTranslate, named_button);
|
||||
m_buttons->AddInput(Translatability::DoNotTranslate, named_button);
|
||||
}
|
||||
for (const char* named_button : {SELECT_BUTTON, START_BUTTON})
|
||||
{
|
||||
m_buttons->AddInput(ControllerEmu::Translate, named_button);
|
||||
m_buttons->AddInput(Translatability::Translate, named_button);
|
||||
}
|
||||
|
||||
// DPad
|
||||
groups.emplace_back(m_dpad = new ControllerEmu::Buttons(DPAD_GROUP));
|
||||
for (const char* named_direction : named_directions)
|
||||
{
|
||||
m_dpad->AddInput(ControllerEmu::Translate, named_direction);
|
||||
m_dpad->AddInput(Translatability::Translate, named_direction);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user