Add ability to dump Balance Board data to local udp port.
This probably won't work on Mac...
This commit is contained in:
parent
3de5b1bed9
commit
998c4042c2
|
@ -409,6 +409,7 @@ void SConfig::LoadSettings()
|
|||
ini.Get("Core", "RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
|
||||
ini.Get("Core", "MMU", &m_LocalCoreStartupParameter.bMMU, false);
|
||||
ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0);
|
||||
ini.Get("Core", "BBDumpPort", &m_LocalCoreStartupParameter.iBBDumpPort, -1);
|
||||
ini.Get("Core", "VBeam", &m_LocalCoreStartupParameter.bVBeamSpeedHack, false);
|
||||
ini.Get("Core", "SyncGPU", &m_LocalCoreStartupParameter.bSyncGPU, false);
|
||||
ini.Get("Core", "FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false);
|
||||
|
|
|
@ -36,7 +36,7 @@ SCoreStartupParameter::SCoreStartupParameter()
|
|||
bMergeBlocks(false), bEnableMemcardSaving(true),
|
||||
bDPL2Decoder(false), iLatency(14),
|
||||
bRunCompareServer(false), bRunCompareClient(false),
|
||||
bMMU(false), bDCBZOFF(false), iTLBHack(0), bVBeamSpeedHack(false),
|
||||
bMMU(false), bDCBZOFF(false), iTLBHack(0), iBBDumpPort(0), bVBeamSpeedHack(false),
|
||||
bSyncGPU(false), bFastDiscSpeed(false),
|
||||
SelectedLanguage(0), bWii(false),
|
||||
bConfirmStop(false), bHideCursor(false),
|
||||
|
@ -65,6 +65,7 @@ void SCoreStartupParameter::LoadDefaults()
|
|||
bMMU = false;
|
||||
bDCBZOFF = false;
|
||||
iTLBHack = 0;
|
||||
iBBDumpPort = -1;
|
||||
bVBeamSpeedHack = false;
|
||||
bSyncGPU = false;
|
||||
bFastDiscSpeed = false;
|
||||
|
|
|
@ -122,6 +122,7 @@ struct SCoreStartupParameter
|
|||
bool bMMU;
|
||||
bool bDCBZOFF;
|
||||
int iTLBHack;
|
||||
int iBBDumpPort;
|
||||
bool bVBeamSpeedHack;
|
||||
bool bSyncGPU;
|
||||
bool bFastDiscSpeed;
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#include "Timer.h"
|
||||
#include "Host.h"
|
||||
#include "ConfigManager.h"
|
||||
#include "SFML/Network.hpp"
|
||||
|
||||
|
||||
#include "WiimoteReal.h"
|
||||
|
||||
|
@ -210,6 +212,12 @@ bool Wiimote::Read()
|
|||
|
||||
if (result > 0 && m_channel > 0)
|
||||
{
|
||||
if (Core::g_CoreStartupParameter.iBBDumpPort > 0 && index == WIIMOTE_BALANCE_BOARD)
|
||||
{
|
||||
static sf::SocketUDP Socket;
|
||||
Socket.Send((char*)rpt.data(), rpt.size(), sf::IPAddress::LocalHost, Core::g_CoreStartupParameter.iBBDumpPort);
|
||||
}
|
||||
|
||||
// Add it to queue
|
||||
rpt.resize(result);
|
||||
m_read_reports.Push(std::move(rpt));
|
||||
|
@ -234,6 +242,11 @@ bool Wiimote::Write()
|
|||
|
||||
if (!is_speaker_data || m_last_audio_report.GetTimeDifference() > 5)
|
||||
{
|
||||
if (Core::g_CoreStartupParameter.iBBDumpPort > 0 && index == WIIMOTE_BALANCE_BOARD)
|
||||
{
|
||||
static sf::SocketUDP Socket;
|
||||
Socket.Send((char*)rpt.data(), rpt.size(), sf::IPAddress::LocalHost, Core::g_CoreStartupParameter.iBBDumpPort);
|
||||
}
|
||||
IOWrite(rpt.data(), rpt.size());
|
||||
|
||||
if (is_speaker_data)
|
||||
|
|
Loading…
Reference in New Issue