mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-25 19:40:07 +00:00
input_engine: Pass LedStatus by const reference
Avoids copies where reasonably applicable
This commit is contained in:
parent
38f3442ea5
commit
985599e485
@ -266,7 +266,7 @@ class OutputDevice {
|
||||
public:
|
||||
virtual ~OutputDevice() = default;
|
||||
|
||||
virtual void SetLED([[maybe_unused]] LedStatus led_status) {}
|
||||
virtual void SetLED([[maybe_unused]] const LedStatus& led_status) {}
|
||||
|
||||
virtual VibrationError SetVibration([[maybe_unused]] const VibrationStatus& vibration_status) {
|
||||
return VibrationError::NotSupported;
|
||||
|
@ -114,7 +114,7 @@ public:
|
||||
|
||||
// Sets a led pattern for a controller
|
||||
virtual void SetLeds([[maybe_unused]] const PadIdentifier& identifier,
|
||||
[[maybe_unused]] const Common::Input::LedStatus led_status) {}
|
||||
[[maybe_unused]] const Common::Input::LedStatus& led_status) {}
|
||||
|
||||
// Sets rumble to a controller
|
||||
virtual Common::Input::VibrationError SetRumble(
|
||||
|
@ -668,7 +668,7 @@ public:
|
||||
explicit OutputFromIdentifier(PadIdentifier identifier_, InputEngine* input_engine_)
|
||||
: identifier(identifier_), input_engine(input_engine_) {}
|
||||
|
||||
virtual void SetLED(Common::Input::LedStatus led_status) {
|
||||
virtual void SetLED(const Common::Input::LedStatus& led_status) {
|
||||
input_engine->SetLeds(identifier, led_status);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user