summaryrefslogtreecommitdiffstats
path: root/src/input_common/sdl/sdl_impl.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-10-25 12:30:23 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-11-16 05:33:21 +0100
commit30e0d1c973290f4813b040eecf83ff4a2c7432c3 (patch)
tree2834cf3cc9970e14608a8af0739ffcac56881332 /src/input_common/sdl/sdl_impl.cpp
parentinput: Disconnect a controller prior to connecting a new one (diff)
downloadyuzu-30e0d1c973290f4813b040eecf83ff4a2c7432c3.tar
yuzu-30e0d1c973290f4813b040eecf83ff4a2c7432c3.tar.gz
yuzu-30e0d1c973290f4813b040eecf83ff4a2c7432c3.tar.bz2
yuzu-30e0d1c973290f4813b040eecf83ff4a2c7432c3.tar.lz
yuzu-30e0d1c973290f4813b040eecf83ff4a2c7432c3.tar.xz
yuzu-30e0d1c973290f4813b040eecf83ff4a2c7432c3.tar.zst
yuzu-30e0d1c973290f4813b040eecf83ff4a2c7432c3.zip
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index a2a83cdc9..a9f7e5103 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -81,18 +81,6 @@ public:
}
bool RumblePlay(u16 amp_low, u16 amp_high) {
- using std::chrono::duration_cast;
- using std::chrono::milliseconds;
- using std::chrono::steady_clock;
-
- // Block non-zero vibrations less than 10ms apart from each other.
- if ((amp_low != 0 || amp_high != 0) &&
- duration_cast<milliseconds>(steady_clock::now() - last_vibration) < milliseconds(10)) {
- return false;
- }
-
- last_vibration = steady_clock::now();
-
if (sdl_controller) {
return SDL_GameControllerRumble(sdl_controller.get(), amp_low, amp_high, 0) == 0;
} else if (sdl_joystick) {
@@ -171,9 +159,6 @@ private:
std::unique_ptr<SDL_GameController, decltype(&SDL_GameControllerClose)> sdl_controller;
mutable std::mutex mutex;
- // This is the timepoint of the last vibration and is used to ensure vibrations are 10ms apart.
- std::chrono::steady_clock::time_point last_vibration;
-
// Motion is initialized without PID values as motion input is not aviable for SDL2
MotionInput motion{0.0f, 0.0f, 0.0f};
};