BTEmu/Wiimote: Cleanups/Fixes.

This commit is contained in:
Jordan Woyak
2020-07-22 17:20:20 -05:00
parent 89ca9b51ad
commit 13ee6bd7bb
20 changed files with 877 additions and 959 deletions

View File

@ -53,8 +53,17 @@ enum class WiimoteSource
namespace WiimoteCommon
{
class HIDWiimote;
WiimoteSource GetSource(unsigned int index);
void SetSource(unsigned int index, WiimoteSource source);
// Used to reconnect WiimoteDevice instance to HID source.
// Must be run from CPU thread.
void UpdateSource(unsigned int index);
HIDWiimote* GetHIDWiimoteSource(unsigned int index);
} // namespace WiimoteCommon
namespace Wiimote
@ -67,12 +76,9 @@ enum class InitializeMode
// The Real Wii Remote sends report every ~5ms (200 Hz).
constexpr int UPDATE_FREQ = 200;
// Custom channel ID used in ControlChannel to indicate disconnects
constexpr int DOLPHIN_DISCONNET_CONTROL_CHANNEL = 99;
void Shutdown();
void Initialize(InitializeMode init_mode);
void Connect(unsigned int index, bool connect);
void ResetAllWiimotes();
void LoadConfig();
void Resume();
@ -91,10 +97,6 @@ ControllerEmu::ControlGroup* GetDrawsomeTabletGroup(int number,
WiimoteEmu::DrawsomeTabletGroup group);
ControllerEmu::ControlGroup* GetTaTaConGroup(int number, WiimoteEmu::TaTaConGroup group);
void ControlChannel(int number, u16 channel_id, const void* data, u32 size);
void InterruptChannel(int number, u16 channel_id, const void* data, u32 size);
bool ButtonPressed(int number);
void Update(int number, bool connected);
bool NetPlay_GetButtonPress(int wiimote, bool pressed);
} // namespace Wiimote