|
8 | 8 | #include "Common/IniFile.h" |
9 | 9 | #include "Common/Logging/Log.h" |
10 | 10 | #include "Core/Config/MainSettings.h" |
| 11 | +#include "Core/Config/WiimoteSettings.h" |
11 | 12 | #include "Core/ConfigManager.h" |
12 | 13 | #include "Core/FreeLookManager.h" |
13 | 14 | #include "Core/HW/GBAPad.h" |
|
21 | 22 | #include "Core/HW/WiimoteReal/WiimoteReal.h" |
22 | 23 | #include "Core/HW/SI/SI.h" |
23 | 24 | #include "Core/HW/SI/SI_Device.h" |
| 25 | +#include "Core/IOS/USB/Bluetooth/BTReal.h" |
24 | 26 | #include "Core/Host.h" |
25 | 27 | #include "Core/System.h" |
| 28 | +#include "Core/WiiUtils.h" |
26 | 29 | #include "DolphinLibretro/Input.h" |
27 | 30 | #include "DolphinLibretro/Common/Options.h" |
28 | 31 | #include "InputCommon/ControlReference/ControlReference.h" |
|
34 | 37 | #include "InputCommon/GCAdapter.h" |
35 | 38 | #include "InputCommon/GCPadStatus.h" |
36 | 39 | #include "InputCommon/InputConfig.h" |
37 | | -#include "Core/Config/WiimoteSettings.h" |
38 | | - |
39 | | -//#include "UICommon/UICommon.h" |
40 | | -//#include "Core/HotkeyManager.h" |
41 | 40 |
|
42 | 41 | #define RETRO_DEVICE_WIIMOTE RETRO_DEVICE_JOYPAD |
43 | 42 | #define RETRO_DEVICE_WIIMOTE_SW ((2 << 8) | RETRO_DEVICE_JOYPAD) |
@@ -581,6 +580,21 @@ void ResetControllers() |
581 | 580 | retro_set_controller_port_device(port, input_types[port]); |
582 | 581 | } |
583 | 582 |
|
| 583 | +void BluetoothPassthroughBind() |
| 584 | +{ |
| 585 | + static bool was_pressed = false; |
| 586 | + bool sync = Libretro::Input::input_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_F12); |
| 587 | + |
| 588 | + if (sync && !was_pressed) |
| 589 | + { |
| 590 | + auto bt_real = WiiUtils::GetBluetoothRealDevice(); |
| 591 | + if (bt_real) |
| 592 | + bt_real->TriggerSyncButtonPressedEvent(); |
| 593 | + } |
| 594 | + |
| 595 | + was_pressed = sync; |
| 596 | +} |
| 597 | + |
584 | 598 | } // namespace Input |
585 | 599 | } // namespace Libretro |
586 | 600 |
|
|
0 commit comments