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:
tmator 2009-02-17 22:15:27 +00:00
parent 7a03ffe210
commit 73a6ae2592
2 changed files with 22 additions and 2 deletions

View File

@ -133,8 +133,9 @@ void SendReportCore(u16 _channelID)
wm_report_core* pReport = (wm_report_core*)(DataFrame + Offset);
Offset += sizeof(wm_report_core);
memset(pReport, 0, sizeof(wm_report_core));
#if defined(HAVE_WX) && HAVE_WX
FillReportInfo(pReport->c);
#endif
LOGV(WII_IPC_WIIMOTE, 2, " SendReportCore()");
@ -157,8 +158,10 @@ void SendReportCoreAccel(u16 _channelID)
Offset += sizeof(wm_report_core_accel);
memset(pReport, 0, sizeof(wm_report_core_accel));
#if defined(HAVE_WX) && HAVE_WX
FillReportInfo(pReport->c);
FillReportAcc(pReport->a);
#endif
LOGV(WII_IPC_WIIMOTE, 2, " SendReportCoreAccel (0x31)");
LOGV(WII_IPC_WIIMOTE, 2, " Channel: %04x", _channelID);
@ -182,11 +185,13 @@ void SendReportCoreAccelIr12(u16 _channelID) {
Offset += sizeof(wm_report_core_accel_ir12);
memset(pReport, 0, sizeof(wm_report_core_accel_ir12));
#if defined(HAVE_WX) && HAVE_WX
FillReportInfo(pReport->c);
FillReportAcc(pReport->a);
// We settle with emulating two objects, not all four. We leave object 2 and 3 with 0xff.
FillReportIR(pReport->ir[0], pReport->ir[1]);
#endif
memset(&pReport->ir[2], 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;
memset(&_ext, 0, sizeof(wm_classic_extension));
#if defined(HAVE_WX) && HAVE_WX
FillReportInfo(pReport->c);
FillReportAcc(pReport->a);
#endif
if(g_Config.bNunchuckConnected)
{
#if defined(HAVE_WX) && HAVE_WX
FillReportExtension(pReport->ext);
#endif
}
else if(g_Config.bClassicControllerConnected)
{
#if defined(HAVE_WX) && HAVE_WX
FillReportClassicExtension(_ext);
#endif
// Copy _ext to pReport->ext
memcpy(&pReport->ext, &_ext, sizeof(_ext));
}
@ -257,17 +268,23 @@ void SendReportCoreAccelIr10Ext(u16 _channelID)
wm_classic_extension _ext;
memset(&_ext, 0, sizeof(wm_classic_extension));
#if defined(HAVE_WX) && HAVE_WX
FillReportInfo(pReport->c);
FillReportAcc(pReport->a);
FillReportIRBasic(pReport->ir[0], pReport->ir[1]);
#endif
if(g_Config.bNunchuckConnected)
{
#if defined(HAVE_WX) && HAVE_WX
FillReportExtension(pReport->ext);
#endif
}
else if(g_Config.bClassicControllerConnected)
{
#if defined(HAVE_WX) && HAVE_WX
FillReportClassicExtension(_ext);
#endif
// Copy _ext to pReport->ext
memcpy(&pReport->ext, &_ext, sizeof(_ext));
}

View File

@ -290,6 +290,7 @@ void ResetVariables()
g_Encryption = false;
// Set default recording values
#if defined(HAVE_WX) && HAVE_WX
for (int i = 0; i < 3; i++)
{
g_RecordingPlaying[i] = -1;
@ -298,7 +299,7 @@ void ResetVariables()
g_RecordingStart[i] = 0;
g_RecordingCurrentTime[i] = 0;
}
#endif
g_EmulatedWiiMoteInitialized = false;
}
@ -520,7 +521,9 @@ void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
{
LOG(WII_IPC_WIIMOTE, "Wiimote_ControlChannel");
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());
#endif
LOG(WII_IPC_WIIMOTE, " Data: %s", Temp.c_str());
}