diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2022-04-19 14:57:08 -0700 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-06-02 19:39:36 -0700 |
| commit | 682d86f4daaba99294f17d1534f3f98fd9bc2f25 (patch) | |
| tree | 062fa83a02efc78930df0ac42a454adad5717f60 /Source | |
| parent | 36d4ee0939765cda58cbe1e11b986f2465ad80d7 (diff) | |
GCAdapter: Fix rumble enabled config on Android
I believe the setting already existed in the UI; it just wasn't implemented in GCAdapter_Android.cpp.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/InputCommon/GCAdapter.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/Core/InputCommon/GCAdapter.cpp b/Source/Core/InputCommon/GCAdapter.cpp index 84381195fa..d13f743817 100644 --- a/Source/Core/InputCommon/GCAdapter.cpp +++ b/Source/Core/InputCommon/GCAdapter.cpp @@ -153,9 +153,7 @@ static u64 s_last_init = 0; static std::optional<size_t> s_config_callback_id = std::nullopt; static std::array<SerialInterface::SIDevices, SerialInterface::MAX_SI_CHANNELS> s_config_si_device_type{}; -#if GCADAPTER_USE_LIBUSB_IMPLEMENTATION static std::array<bool, SerialInterface::MAX_SI_CHANNELS> s_config_rumble_enabled{}; -#endif static void Read() { @@ -400,9 +398,7 @@ static void RefreshConfig() for (int i = 0; i < SerialInterface::MAX_SI_CHANNELS; ++i) { s_config_si_device_type[i] = Config::Get(Config::GetInfoForSIDevice(i)); -#if GCADAPTER_USE_LIBUSB_IMPLEMENTATION s_config_rumble_enabled[i] = Config::Get(Config::GetInfoForAdapterRumble(i)); -#endif } } @@ -865,11 +861,11 @@ static void ResetRumbleLockNeeded() void Output(int chan, u8 rumble_command) { - if (!UseAdapter()) + if (!UseAdapter() || !s_config_rumble_enabled[chan]) return; #if GCADAPTER_USE_LIBUSB_IMPLEMENTATION - if (s_handle == nullptr || !s_config_rumble_enabled[chan]) + if (s_handle == nullptr) return; #elif GCADAPTER_USE_ANDROID_IMPLEMENTATION if (!s_detected || !s_fd) |
