summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/UDPWrapper.cpp
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-06-17 17:09:10 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-07-11 13:32:56 -0400
commite20a0265dec84005637f869cd0a4281bd963af7e (patch)
tree4244671a0a99349deb728a99d7cc1be4ff60de8d /Source/Core/InputCommon/UDPWrapper.cpp
parentc11672b2d89b01469dd4c440046636c035629267 (diff)
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!
Diffstat (limited to 'Source/Core/InputCommon/UDPWrapper.cpp')
-rw-r--r--Source/Core/InputCommon/UDPWrapper.cpp96
1 files changed, 0 insertions, 96 deletions
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 <cstdio>
-#include <cstdlib>
-#include <cstring>
-
-#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;
-}