finish to fix nowx, is it work on linux ?
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2294 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
7a03ffe210
commit
73a6ae2592
|
@ -133,8 +133,9 @@ void SendReportCore(u16 _channelID)
|
||||||
wm_report_core* pReport = (wm_report_core*)(DataFrame + Offset);
|
wm_report_core* pReport = (wm_report_core*)(DataFrame + Offset);
|
||||||
Offset += sizeof(wm_report_core);
|
Offset += sizeof(wm_report_core);
|
||||||
memset(pReport, 0, sizeof(wm_report_core));
|
memset(pReport, 0, sizeof(wm_report_core));
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
FillReportInfo(pReport->c);
|
FillReportInfo(pReport->c);
|
||||||
|
#endif
|
||||||
|
|
||||||
LOGV(WII_IPC_WIIMOTE, 2, " SendReportCore()");
|
LOGV(WII_IPC_WIIMOTE, 2, " SendReportCore()");
|
||||||
|
|
||||||
|
@ -157,8 +158,10 @@ void SendReportCoreAccel(u16 _channelID)
|
||||||
Offset += sizeof(wm_report_core_accel);
|
Offset += sizeof(wm_report_core_accel);
|
||||||
memset(pReport, 0, sizeof(wm_report_core_accel));
|
memset(pReport, 0, sizeof(wm_report_core_accel));
|
||||||
|
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
FillReportInfo(pReport->c);
|
FillReportInfo(pReport->c);
|
||||||
FillReportAcc(pReport->a);
|
FillReportAcc(pReport->a);
|
||||||
|
#endif
|
||||||
|
|
||||||
LOGV(WII_IPC_WIIMOTE, 2, " SendReportCoreAccel (0x31)");
|
LOGV(WII_IPC_WIIMOTE, 2, " SendReportCoreAccel (0x31)");
|
||||||
LOGV(WII_IPC_WIIMOTE, 2, " Channel: %04x", _channelID);
|
LOGV(WII_IPC_WIIMOTE, 2, " Channel: %04x", _channelID);
|
||||||
|
@ -182,11 +185,13 @@ void SendReportCoreAccelIr12(u16 _channelID) {
|
||||||
Offset += sizeof(wm_report_core_accel_ir12);
|
Offset += sizeof(wm_report_core_accel_ir12);
|
||||||
memset(pReport, 0, sizeof(wm_report_core_accel_ir12));
|
memset(pReport, 0, sizeof(wm_report_core_accel_ir12));
|
||||||
|
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
FillReportInfo(pReport->c);
|
FillReportInfo(pReport->c);
|
||||||
FillReportAcc(pReport->a);
|
FillReportAcc(pReport->a);
|
||||||
|
|
||||||
// We settle with emulating two objects, not all four. We leave object 2 and 3 with 0xff.
|
// We settle with emulating two objects, not all four. We leave object 2 and 3 with 0xff.
|
||||||
FillReportIR(pReport->ir[0], pReport->ir[1]);
|
FillReportIR(pReport->ir[0], pReport->ir[1]);
|
||||||
|
#endif
|
||||||
memset(&pReport->ir[2], 0xff, sizeof(wm_ir_extended));
|
memset(&pReport->ir[2], 0xff, sizeof(wm_ir_extended));
|
||||||
memset(&pReport->ir[3], 0xff, sizeof(wm_ir_extended));
|
memset(&pReport->ir[3], 0xff, sizeof(wm_ir_extended));
|
||||||
|
|
||||||
|
@ -216,16 +221,22 @@ void SendReportCoreAccelExt16(u16 _channelID)
|
||||||
wm_classic_extension _ext;
|
wm_classic_extension _ext;
|
||||||
memset(&_ext, 0, sizeof(wm_classic_extension));
|
memset(&_ext, 0, sizeof(wm_classic_extension));
|
||||||
|
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
FillReportInfo(pReport->c);
|
FillReportInfo(pReport->c);
|
||||||
FillReportAcc(pReport->a);
|
FillReportAcc(pReport->a);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(g_Config.bNunchuckConnected)
|
if(g_Config.bNunchuckConnected)
|
||||||
{
|
{
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
FillReportExtension(pReport->ext);
|
FillReportExtension(pReport->ext);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if(g_Config.bClassicControllerConnected)
|
else if(g_Config.bClassicControllerConnected)
|
||||||
{
|
{
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
FillReportClassicExtension(_ext);
|
FillReportClassicExtension(_ext);
|
||||||
|
#endif
|
||||||
// Copy _ext to pReport->ext
|
// Copy _ext to pReport->ext
|
||||||
memcpy(&pReport->ext, &_ext, sizeof(_ext));
|
memcpy(&pReport->ext, &_ext, sizeof(_ext));
|
||||||
}
|
}
|
||||||
|
@ -257,17 +268,23 @@ void SendReportCoreAccelIr10Ext(u16 _channelID)
|
||||||
wm_classic_extension _ext;
|
wm_classic_extension _ext;
|
||||||
memset(&_ext, 0, sizeof(wm_classic_extension));
|
memset(&_ext, 0, sizeof(wm_classic_extension));
|
||||||
|
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
FillReportInfo(pReport->c);
|
FillReportInfo(pReport->c);
|
||||||
FillReportAcc(pReport->a);
|
FillReportAcc(pReport->a);
|
||||||
FillReportIRBasic(pReport->ir[0], pReport->ir[1]);
|
FillReportIRBasic(pReport->ir[0], pReport->ir[1]);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(g_Config.bNunchuckConnected)
|
if(g_Config.bNunchuckConnected)
|
||||||
{
|
{
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
FillReportExtension(pReport->ext);
|
FillReportExtension(pReport->ext);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if(g_Config.bClassicControllerConnected)
|
else if(g_Config.bClassicControllerConnected)
|
||||||
{
|
{
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
FillReportClassicExtension(_ext);
|
FillReportClassicExtension(_ext);
|
||||||
|
#endif
|
||||||
// Copy _ext to pReport->ext
|
// Copy _ext to pReport->ext
|
||||||
memcpy(&pReport->ext, &_ext, sizeof(_ext));
|
memcpy(&pReport->ext, &_ext, sizeof(_ext));
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,6 +290,7 @@ void ResetVariables()
|
||||||
g_Encryption = false;
|
g_Encryption = false;
|
||||||
|
|
||||||
// Set default recording values
|
// Set default recording values
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
g_RecordingPlaying[i] = -1;
|
g_RecordingPlaying[i] = -1;
|
||||||
|
@ -298,7 +299,7 @@ void ResetVariables()
|
||||||
g_RecordingStart[i] = 0;
|
g_RecordingStart[i] = 0;
|
||||||
g_RecordingCurrentTime[i] = 0;
|
g_RecordingCurrentTime[i] = 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
g_EmulatedWiiMoteInitialized = false;
|
g_EmulatedWiiMoteInitialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,7 +521,9 @@ void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
|
||||||
{
|
{
|
||||||
LOG(WII_IPC_WIIMOTE, "Wiimote_ControlChannel");
|
LOG(WII_IPC_WIIMOTE, "Wiimote_ControlChannel");
|
||||||
std::string Temp = ArrayToString(data, 0, _Size);
|
std::string Temp = ArrayToString(data, 0, _Size);
|
||||||
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
Console::Print("\n%s: ControlChannel: %s\n", Tm().c_str(), Temp.c_str());
|
Console::Print("\n%s: ControlChannel: %s\n", Tm().c_str(), Temp.c_str());
|
||||||
|
#endif
|
||||||
LOG(WII_IPC_WIIMOTE, " Data: %s", Temp.c_str());
|
LOG(WII_IPC_WIIMOTE, " Data: %s", Temp.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue