From e20a0265dec84005637f869cd0a4281bd963af7e Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 17 Jun 2014 17:09:10 -0400 Subject: Remove UDPWiimote feature It substantially complicates the code and doesn't really provide any functionality. According to the forums, the Android app is out of date and has been broken for quite a while. If we want to add this back, I'd write an app that speaks a more native Wiimote protocol, and we can hook that up to the backend quite easily. It could even be over our NetPlay protocol! --- Source/Core/InputCommon/UDPWrapper.cpp | 96 ---------------------------------- 1 file changed, 96 deletions(-) delete mode 100644 Source/Core/InputCommon/UDPWrapper.cpp (limited to 'Source/Core/InputCommon/UDPWrapper.cpp') diff --git a/Source/Core/InputCommon/UDPWrapper.cpp b/Source/Core/InputCommon/UDPWrapper.cpp deleted file mode 100644 index 5d34cd7624..0000000000 --- a/Source/Core/InputCommon/UDPWrapper.cpp +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2013 Dolphin Emulator Project -// Licensed under GPLv2 -// Refer to the license.txt file included. - -#include -#include -#include - -#include "InputCommon/UDPWrapper.h" - -static const std::string DefaultPort(const int index) -{ - static std::string s; - s = "443"; - s += (char)('2' + index); - return s; -} - -UDPWrapper::UDPWrapper(int indx, const char* const _name) : - ControllerEmu::ControlGroup(_name,GROUP_TYPE_UDPWII), - inst(nullptr), index(indx), - updIR(false),updAccel(false), - updButt(false),udpEn(false) - , port(DefaultPort(indx)) -{ - //PanicAlert("UDPWrapper #%d ctor",index); -} - -void UDPWrapper::LoadConfig(IniFile::Section *sec, const std::string& defdev, const std::string& base ) -{ - ControlGroup::LoadConfig(sec,defdev,base); - - std::string group( base + name ); group += "/"; - - int _updAccel,_updIR,_updButt,_udpEn,_updNun,_updNunAccel; - sec->Get(group + "Enable",&_udpEn, 0); - sec->Get(group + "Port", &port, DefaultPort(index)); - sec->Get(group + "Update_Accel", &_updAccel, 1); - sec->Get(group + "Update_IR", &_updIR, 1); - sec->Get(group + "Update_Butt", &_updButt, 1); - sec->Get(group + "Update_Nunchuk", &_updNun, 1); - sec->Get(group + "Update_NunchukAccel", &_updNunAccel, 0); - - udpEn=(_udpEn>0); - updAccel=(_updAccel>0); - updIR=(_updIR>0); - updButt=(_updButt>0); - updNun=(_updNun>0); - updNunAccel=(_updNunAccel>0); - - Refresh(); -} - - -void UDPWrapper::SaveConfig(IniFile::Section *sec, const std::string& defdev, const std::string& base ) -{ - ControlGroup::SaveConfig(sec,defdev,base); - std::string group( base + name ); group += "/"; - sec->Set(group + "Enable", (int)udpEn, 0); - sec->Set(group + "Port", port, DefaultPort(index)); - sec->Set(group + "Update_Accel", (int)updAccel, 1); - sec->Set(group + "Update_IR", (int)updIR, 1); - sec->Set(group + "Update_Butt", (int)updButt, 1); - sec->Set(group + "Update_Nunchuk", (int)updNun, 1); - sec->Set(group + "Update_NunchukAccel", (int)updNunAccel, 0); -} - - -void UDPWrapper::Refresh() -{ - bool udpAEn=(inst!=nullptr); - if (udpEn && udpAEn) - { - if (inst->getPort() == port) - { - delete inst; - inst = new UDPWiimote(port, "Dolphin-Emu", index); //TODO: Changeable display name - } - return; - } - if (!udpEn) - { - if (inst) - delete inst; - inst = nullptr; - return; - } - //else - inst = new UDPWiimote(port, "Dolphin-Emu", index); -} - -UDPWrapper::~UDPWrapper() -{ - if (inst) - delete inst; -} -- cgit v1.2.3