mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Wiimote:
1. Fixed the dual mode. You should now be able to change between the real and emulated Wiimote at any time, even when the Nunchuck is connected. It also supports third party Wireless Nunchucks that never sends any calibration values. The Nunchuck status should be automatically updated. The Nunchuck stick may get stuck, but that should fix itself if you disconnect and reconnect again. The only important problems seems to be that the real Wiimote fails to answer sometimes so that the Core functions disconnect it. 2. Began looking at how to reconnect the Wiimote after an unwanted HCI disconnect command git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2129 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -370,6 +370,7 @@ void SendReadDataReply(u16 _channelID, void* _Base, u16 _Address, u8 _Size)
|
||||
// Add header values
|
||||
pReply->buttons = 0;
|
||||
pReply->error = 0;
|
||||
// 0x1 means two bytes, 0xf means 16 bytes
|
||||
pReply->size = (copySize - 1) & 0xf;
|
||||
pReply->address = Common::swap16(_Address + dataOffset);
|
||||
|
||||
@ -534,7 +535,7 @@ void WmWriteData(u16 _channelID, wm_write_data* wd)
|
||||
request rs and all its eventual instructions it may include (for example turn off
|
||||
rumble or something else) and just send the status report. */
|
||||
// ----------------
|
||||
void WmRequestStatus(u16 _channelID, wm_request_status* rs)
|
||||
void WmRequestStatus(u16 _channelID, wm_request_status* rs, int Extension)
|
||||
{
|
||||
//PanicAlert("WmRequestStatus");
|
||||
LOGV(WII_IPC_WIIMOTE, 0, "================================================");
|
||||
@ -562,11 +563,22 @@ void WmRequestStatus(u16 _channelID, wm_request_status* rs)
|
||||
0x55 - 0xff: level 4 */
|
||||
pStatus->battery = 0x5f; // fully charged
|
||||
|
||||
// Read config value for this one
|
||||
if(g_Config.bNunchuckConnected || g_Config.bClassicControllerConnected)
|
||||
pStatus->extension = 1;
|
||||
// Check if we have a specific order about the extension status
|
||||
if (Extension == -1)
|
||||
{
|
||||
// Read config value for this one
|
||||
if(g_Config.bNunchuckConnected || g_Config.bClassicControllerConnected)
|
||||
pStatus->extension = 1;
|
||||
else
|
||||
pStatus->extension = 0;
|
||||
}
|
||||
else
|
||||
pStatus->extension = 0;
|
||||
{
|
||||
if(Extension)
|
||||
pStatus->extension = 1;
|
||||
else
|
||||
pStatus->extension = 0;
|
||||
}
|
||||
|
||||
LOGV(WII_IPC_WIIMOTE, 0, " Extension: %x", pStatus->extension);
|
||||
LOGV(WII_IPC_WIIMOTE, 0, " SendStatusReport()");
|
||||
|
Reference in New Issue
Block a user