mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
ControlGroup: Convert group type enum into an enum class
Gets some constants out of the ControllerEmu namespace, and modifies ControlGroup so that it uses the enum type itself to represent the underlying type, rather than a u32 value.
This commit is contained in:
@ -14,12 +14,13 @@
|
||||
|
||||
namespace ControllerEmu
|
||||
{
|
||||
ControlGroup::ControlGroup(const std::string& name_, const u32 type_)
|
||||
ControlGroup::ControlGroup(const std::string& name_, const GroupType type_)
|
||||
: name(name_), ui_name(name_), type(type_)
|
||||
{
|
||||
}
|
||||
|
||||
ControlGroup::ControlGroup(const std::string& name_, const std::string& ui_name_, const u32 type_)
|
||||
ControlGroup::ControlGroup(const std::string& name_, const std::string& ui_name_,
|
||||
const GroupType type_)
|
||||
: name(name_), ui_name(ui_name_), type(type_)
|
||||
{
|
||||
}
|
||||
@ -62,7 +63,7 @@ void ControlGroup::LoadConfig(IniFile::Section* sec, const std::string& defdev,
|
||||
}
|
||||
|
||||
// extensions
|
||||
if (type == GROUP_TYPE_EXTENSION)
|
||||
if (type == GroupType::Extension)
|
||||
{
|
||||
Extension* const ext = (Extension*)this;
|
||||
|
||||
@ -115,7 +116,7 @@ void ControlGroup::SaveConfig(IniFile::Section* sec, const std::string& defdev,
|
||||
}
|
||||
|
||||
// extensions
|
||||
if (type == GROUP_TYPE_EXTENSION)
|
||||
if (type == GroupType::Extension)
|
||||
{
|
||||
Extension* const ext = (Extension*)this;
|
||||
sec->Set(base + name, ext->attachments[ext->switch_extension]->GetName(), "None");
|
||||
|
Reference in New Issue
Block a user