mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-19 14:09:59 +00:00
input_common/sdl: Correct return values within implementations of GetPollers()
In both cases, we weren't actually returning anything, which is undefined behavior.
This commit is contained in:
parent
874826b6dd
commit
eb335f51ca
2 changed files with 6 additions and 2 deletions
|
@ -34,7 +34,9 @@ public:
|
|||
|
||||
class NullState : public State {
|
||||
public:
|
||||
Pollers GetPollers(Polling::DeviceType type) override {}
|
||||
Pollers GetPollers(Polling::DeviceType type) override {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
std::unique_ptr<State> Init();
|
||||
|
|
|
@ -652,6 +652,7 @@ private:
|
|||
|
||||
SDLState::Pollers SDLState::GetPollers(InputCommon::Polling::DeviceType type) {
|
||||
Pollers pollers;
|
||||
|
||||
switch (type) {
|
||||
case InputCommon::Polling::DeviceType::Analog:
|
||||
pollers.emplace_back(std::make_unique<Polling::SDLAnalogPoller>(*this));
|
||||
|
@ -659,8 +660,9 @@ SDLState::Pollers SDLState::GetPollers(InputCommon::Polling::DeviceType type) {
|
|||
case InputCommon::Polling::DeviceType::Button:
|
||||
pollers.emplace_back(std::make_unique<Polling::SDLButtonPoller>(*this));
|
||||
break;
|
||||
return pollers;
|
||||
}
|
||||
|
||||
return pollers;
|
||||
}
|
||||
|
||||
} // namespace SDL
|
||||
|
|
Loading…
Reference in a new issue