Wiimote: Fixed the switching between real and emulated wiimote, the reporting mode is now shared in real/emu dual mode, the accelerator neutral values are shared, the extension is somewhat shared but still doesn't support unplugging and reinserting the extension during gameplay in dual mode. Improved debugging, fixed a bug in movement recording, fixed a bug in report 0x21 eeprom reading so that the game reads the accelerator neutral values from it.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2048 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-02-01 13:01:50 +00:00
parent 529bf35d6a
commit 888465868d
17 changed files with 806 additions and 260 deletions

View File

@ -25,7 +25,7 @@
#pragma pack(push, 1)
#endif
//source: HID_010_SPC_PFL/1.0 (official HID specification)
// Source: HID_010_SPC_PFL/1.0 (official HID specification)
struct hid_packet {
u8 param : 4;
@ -225,6 +225,10 @@ struct wm_classic_extension
wm_cc_5 b2; // byte 5
};
//******************************************************************************
// Data reports
//******************************************************************************
#define WM_REPORT_CORE 0x30
struct wm_report_core {
wm_core c;
@ -282,8 +286,23 @@ struct wm_report_ext21
#define WM_SPEAKER_MUTE 0x19
//******************************************************************************
// Custom structs
//******************************************************************************
/**
* @struct accel_t
* @brief Accelerometer struct. For any device with an accelerometer.
*/
struct accel_cal
{
wm_accel cal_zero; /**< zero calibration */
wm_accel cal_g; /**< 1g difference around 0cal */
};
#if defined(_MSC_VER)
#pragma pack(pop)
#pragma pack(pop)
#endif
#endif //WIIMOTE_HID_H