mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
ControlGroup/Slider: Return state data by value
Makes it less error-prone to get state data from sliders (no need to pass any locals), and also allows direct assignment, letting the retrieved data be const.
This commit is contained in:
@ -13,9 +13,14 @@ namespace ControllerEmu
|
||||
class Slider : public ControlGroup
|
||||
{
|
||||
public:
|
||||
struct StateData
|
||||
{
|
||||
ControlState value{};
|
||||
};
|
||||
|
||||
Slider(const std::string& name_, const std::string& ui_name_);
|
||||
explicit Slider(const std::string& name_);
|
||||
|
||||
void GetState(ControlState* slider);
|
||||
StateData GetState();
|
||||
};
|
||||
} // namespace ControllerEmu
|
||||
|
Reference in New Issue
Block a user