mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
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.
This commit is contained in:
parent
36d4ee0939
commit
682d86f4da
@ -153,9 +153,7 @@ static u64 s_last_init = 0;
|
|||||||
static std::optional<size_t> s_config_callback_id = std::nullopt;
|
static std::optional<size_t> s_config_callback_id = std::nullopt;
|
||||||
static std::array<SerialInterface::SIDevices, SerialInterface::MAX_SI_CHANNELS>
|
static std::array<SerialInterface::SIDevices, SerialInterface::MAX_SI_CHANNELS>
|
||||||
s_config_si_device_type{};
|
s_config_si_device_type{};
|
||||||
#if GCADAPTER_USE_LIBUSB_IMPLEMENTATION
|
|
||||||
static std::array<bool, SerialInterface::MAX_SI_CHANNELS> s_config_rumble_enabled{};
|
static std::array<bool, SerialInterface::MAX_SI_CHANNELS> s_config_rumble_enabled{};
|
||||||
#endif
|
|
||||||
|
|
||||||
static void Read()
|
static void Read()
|
||||||
{
|
{
|
||||||
@ -400,9 +398,7 @@ static void RefreshConfig()
|
|||||||
for (int i = 0; i < SerialInterface::MAX_SI_CHANNELS; ++i)
|
for (int i = 0; i < SerialInterface::MAX_SI_CHANNELS; ++i)
|
||||||
{
|
{
|
||||||
s_config_si_device_type[i] = Config::Get(Config::GetInfoForSIDevice(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));
|
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)
|
void Output(int chan, u8 rumble_command)
|
||||||
{
|
{
|
||||||
if (!UseAdapter())
|
if (!UseAdapter() || !s_config_rumble_enabled[chan])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if GCADAPTER_USE_LIBUSB_IMPLEMENTATION
|
#if GCADAPTER_USE_LIBUSB_IMPLEMENTATION
|
||||||
if (s_handle == nullptr || !s_config_rumble_enabled[chan])
|
if (s_handle == nullptr)
|
||||||
return;
|
return;
|
||||||
#elif GCADAPTER_USE_ANDROID_IMPLEMENTATION
|
#elif GCADAPTER_USE_ANDROID_IMPLEMENTATION
|
||||||
if (!s_detected || !s_fd)
|
if (!s_detected || !s_fd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user