summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-03-18 16:26:13 +0100
committerLioncash <mathew1800@gmail.com>2019-03-18 16:40:35 +0100
commit874826b6ddef20f190013f24021d20e0338d5593 (patch)
treea8c904b3b04deed81668f070de12a4c43e9b6af5 /src
parentMerge pull request #2259 from lioncash/fsp (diff)
downloadyuzu-874826b6ddef20f190013f24021d20e0338d5593.tar
yuzu-874826b6ddef20f190013f24021d20e0338d5593.tar.gz
yuzu-874826b6ddef20f190013f24021d20e0338d5593.tar.bz2
yuzu-874826b6ddef20f190013f24021d20e0338d5593.tar.lz
yuzu-874826b6ddef20f190013f24021d20e0338d5593.tar.xz
yuzu-874826b6ddef20f190013f24021d20e0338d5593.tar.zst
yuzu-874826b6ddef20f190013f24021d20e0338d5593.zip
Diffstat (limited to 'src')
-rw-r--r--src/input_common/sdl/sdl.h10
-rw-r--r--src/input_common/sdl/sdl_impl.cpp5
-rw-r--r--src/input_common/sdl/sdl_impl.h5
3 files changed, 9 insertions, 11 deletions
diff --git a/src/input_common/sdl/sdl.h b/src/input_common/sdl/sdl.h
index 02a8d2e2c..940ca7f1b 100644
--- a/src/input_common/sdl/sdl.h
+++ b/src/input_common/sdl/sdl.h
@@ -24,17 +24,17 @@ namespace InputCommon::SDL {
class State {
public:
- /// Unresisters SDL device factories and shut them down.
+ using Pollers = std::vector<std::unique_ptr<Polling::DevicePoller>>;
+
+ /// Unregisters SDL device factories and shut them down.
virtual ~State() = default;
- virtual std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> GetPollers(
- InputCommon::Polling::DeviceType type) = 0;
+ virtual Pollers GetPollers(Polling::DeviceType type) = 0;
};
class NullState : public State {
public:
- std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> GetPollers(
- InputCommon::Polling::DeviceType type) override {}
+ Pollers GetPollers(Polling::DeviceType type) override {}
};
std::unique_ptr<State> Init();
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index 6e8376549..f44a4a332 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -650,9 +650,8 @@ private:
};
} // namespace Polling
-std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> SDLState::GetPollers(
- InputCommon::Polling::DeviceType type) {
- std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> pollers;
+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));
diff --git a/src/input_common/sdl/sdl_impl.h b/src/input_common/sdl/sdl_impl.h
index fec82fbe6..2579741d6 100644
--- a/src/input_common/sdl/sdl_impl.h
+++ b/src/input_common/sdl/sdl_impl.h
@@ -25,7 +25,7 @@ public:
/// Initializes and registers SDL device factories
SDLState();
- /// Unresisters SDL device factories and shut them down.
+ /// Unregisters SDL device factories and shut them down.
~SDLState() override;
/// Handle SDL_Events for joysticks from SDL_PollEvent
@@ -35,8 +35,7 @@ public:
std::shared_ptr<SDLJoystick> GetSDLJoystickByGUID(const std::string& guid, int port);
/// Get all DevicePoller that use the SDL backend for a specific device type
- std::vector<std::unique_ptr<InputCommon::Polling::DevicePoller>> GetPollers(
- InputCommon::Polling::DeviceType type) override;
+ Pollers GetPollers(Polling::DeviceType type) override;
/// Used by the Pollers during config
std::atomic<bool> polling = false;