mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 21:35:46 +00:00
input_engine: Take BasicMotion by const reference with SetMotion() and TriggerOnMotionChange()
Copies the BasicMotion instance once instead of twice.
This commit is contained in:
parent
e0e9f98fc6
commit
190cfc5997
3 changed files with 7 additions and 6 deletions
|
@ -88,7 +88,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
BasicMotion GetMotion() {
|
||||
const BasicMotion& GetMotion() const {
|
||||
return motion;
|
||||
}
|
||||
|
||||
|
@ -367,7 +367,7 @@ void SDLDriver::HandleGameControllerEvent(const SDL_Event& event) {
|
|||
if (joystick->UpdateMotion(event.csensor)) {
|
||||
const PadIdentifier identifier = joystick->GetPadIdentifier();
|
||||
SetMotion(identifier, 0, joystick->GetMotion());
|
||||
};
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue