mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-05 01:42:41 +00:00
Wiimote: Fixed the switch during gameplay option. The only issue left seems to be that the real wiimote sometimes doesn't get the correct reporting mode
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2013 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
3c4a73d5a6
commit
b0736a1508
10 changed files with 199 additions and 59 deletions
|
@ -39,14 +39,14 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Includes
|
||||
// ¯¯¯¯¯¯¯¯¯¯¯¯¯
|
||||
#include "pluginspecs_wiimote.h"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "Common.h" // Common
|
||||
#include "StringUtil.h"
|
||||
#include "pluginspecs_wiimote.h"
|
||||
|
||||
#include "main.h" // Local
|
||||
#include "wiimote_hid.h"
|
||||
#include "EmuMain.h"
|
||||
#include "EmuSubroutines.h"
|
||||
|
@ -97,12 +97,12 @@ void HidOutputReport(u16 _channelID, wm_report* sr) {
|
|||
WmDataReporting(_channelID, (wm_data_reporting*)sr->data);
|
||||
break;
|
||||
case WM_REQUEST_STATUS: // 0x15
|
||||
if (!g_Config.bUseRealWiimote) WmRequestStatus(_channelID, (wm_request_status*)sr->data);
|
||||
if (!g_Config.bUseRealWiimote || !g_RealWiiMotePresent) WmRequestStatus(_channelID, (wm_request_status*)sr->data);
|
||||
//Temp = ArrayToString(sr->data, sizeof(wm_request_status), 0);
|
||||
//Console::Print("\n%s: InterruptChannel: %s\n", Tm().c_str(), Temp.c_str());
|
||||
break;
|
||||
case WM_READ_DATA: // 0x17
|
||||
if (!g_Config.bUseRealWiimote) WmReadData(_channelID, (wm_read_data*)sr->data);
|
||||
if (!g_Config.bUseRealWiimote || !g_RealWiiMotePresent) WmReadData(_channelID, (wm_read_data*)sr->data);
|
||||
break;
|
||||
|
||||
/* This enables or disables the IR lights, we update the global variable g_IR
|
||||
|
@ -116,17 +116,17 @@ void HidOutputReport(u16 _channelID, wm_report* sr) {
|
|||
break;
|
||||
|
||||
case WM_WRITE_DATA: // 0x16
|
||||
if (!g_Config.bUseRealWiimote) WmWriteData(_channelID, (wm_write_data*)sr->data);
|
||||
if (!g_Config.bUseRealWiimote || !g_RealWiiMotePresent) WmWriteData(_channelID, (wm_write_data*)sr->data);
|
||||
break;
|
||||
case WM_SPEAKER_ENABLE: // 0x14
|
||||
LOGV(WII_IPC_WIIMOTE, 1, " WM Speaker Enable 0x%02x: 0x%02x", sr->channel, sr->data[0]);
|
||||
Console::Print("Speaker Enable/Disable 0x%02x: 0x%02x\n", sr->channel, sr->data[0]);
|
||||
//Console::Print("Speaker Enable/Disable 0x%02x: 0x%02x\n", sr->channel, sr->data[0]);
|
||||
if(sr->data[0] == 0x02) g_Speaker = 0;
|
||||
else if(sr->data[0] == 0x06) g_Speaker = 1;
|
||||
break;
|
||||
case WM_SPEAKER_MUTE:
|
||||
LOGV(WII_IPC_WIIMOTE, 1, " WM Mute Enable 0x%02x: 0x%02x", sr->channel, sr->data[0]);
|
||||
Console::Print("Speaker Mute/Unmute 0x%02x: 0x%02x\n", sr->channel, sr->data[0]);
|
||||
//Console::Print("Speaker Mute/Unmute 0x%02x: 0x%02x\n", sr->channel, sr->data[0]);
|
||||
if(sr->data[0] == 0x02) g_SpeakerVoice = 0; // g_SpeakerVoice
|
||||
else if(sr->data[0] == 0x06) g_SpeakerVoice = 1;
|
||||
break;
|
||||
|
@ -196,9 +196,9 @@ void WmSendAck(u16 _channelID, u8 _reportID, u32 address)
|
|||
|
||||
LOGV(WII_IPC_WIIMOTE, 2, " WMSendAck()");
|
||||
LOGV(WII_IPC_WIIMOTE, 2, " Report ID: %02x", _reportID);
|
||||
//std::string Temp = ArrayToString(DataFrame, Offset, 0);
|
||||
std::string Temp = ArrayToString(DataFrame, Offset, 0);
|
||||
//LOGV(WII_IPC_WIIMOTE, 2, " Data: %s", Temp.c_str());
|
||||
//Console::Print("%s: WMSendAck: %s\n", Tm(true).c_str(), Temp.c_str());
|
||||
Console::Print("%s: WMSendAck: %s\n", Tm(true).c_str(), Temp.c_str());
|
||||
|
||||
/* Debug. Write the report for extension registry writes.
|
||||
if((_reportID == 0x16 || _reportID == 0x17) && ((address >> 16) & 0xfe) == 0xa4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue