summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2022-08-05 20:40:44 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2022-08-06 00:20:05 +0200
commit80b462e553ed3a5cee2c5a86244937f94fd2513f (patch)
tree03bb83709e686fb315c397471d33d3b3554e5ec3 /src/core
parentController bugfixes in profile select (#8716) (diff)
downloadyuzu-80b462e553ed3a5cee2c5a86244937f94fd2513f.tar
yuzu-80b462e553ed3a5cee2c5a86244937f94fd2513f.tar.gz
yuzu-80b462e553ed3a5cee2c5a86244937f94fd2513f.tar.bz2
yuzu-80b462e553ed3a5cee2c5a86244937f94fd2513f.tar.lz
yuzu-80b462e553ed3a5cee2c5a86244937f94fd2513f.tar.xz
yuzu-80b462e553ed3a5cee2c5a86244937f94fd2513f.tar.zst
yuzu-80b462e553ed3a5cee2c5a86244937f94fd2513f.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hid/emulated_controller.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index 8c3895937..3552ad07c 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#include "common/thread.h"
#include "core/hid/emulated_controller.h"
#include "core/hid/input_converter.h"
@@ -949,6 +950,9 @@ bool EmulatedController::TestVibration(std::size_t device_index) {
// Send a slight vibration to test for rumble support
output_devices[device_index]->SetVibration(test_vibration);
+ // Wait for about 15ms to ensure the controller is ready for the stop command
+ std::this_thread::sleep_for(std::chrono::milliseconds(15));
+
// Stop any vibration and return the result
return output_devices[device_index]->SetVibration(zero_vibration) ==
Common::Input::VibrationError::None;