diff --git a/ConfigReader.cpp b/ConfigReader.cpp index 1ce167f..cf6a96f 100644 --- a/ConfigReader.cpp +++ b/ConfigReader.cpp @@ -14,14 +14,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . ****************************************************************************/ +#include "./ConfigReader.hpp" + #include #include #include +#include -#include "ConfigReader.hpp" -#include "config/ConfigParser.hpp" -#include "config/ConfigValues.hpp" -#include "utils/CPStringTools.hpp" +#include "dynamic_libs/fs_functions.h" +#include "utils/logger.h" s32 ConfigReader::numberValidFiles = 0; ConfigReader *ConfigReader::instance = NULL; diff --git a/ConfigReader.hpp b/ConfigReader.hpp index ba13c95..c793021 100644 --- a/ConfigReader.hpp +++ b/ConfigReader.hpp @@ -17,19 +17,11 @@ #ifndef _ConfigReader_H_ #define _ConfigReader_H_ +#include #include #include -#include - -#include -#include #include "./ControllerPatcher.hpp" -#include "./utils/PadConst.hpp" -#include "./utils/CPRetainVars.hpp" - -#include "dynamic_libs/fs_functions.h" -#include "utils/logger.h" #define CONTROLLER_PATCHER_PATH "/vol/external01/wiiu/controller"; diff --git a/ControllerPatcher.cpp b/ControllerPatcher.cpp index 0176262..da9be8c 100644 --- a/ControllerPatcher.cpp +++ b/ControllerPatcher.cpp @@ -14,13 +14,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . ****************************************************************************/ - +#include "ControllerPatcher.hpp" #include #include -#include + #include +#include #include -#include "ControllerPatcher.hpp" + +#include "utils/logger.h" + +#include "dynamic_libs/sys_functions.h" +#include "dynamic_libs/syshid_functions.h" +#include "dynamic_libs/socket_functions.h" +#include "dynamic_libs/padscore_functions.h" // This stores the holded buttons for the gamepad after the button remapping. static u32 buttonRemapping_lastButtonsHold = 0; diff --git a/ControllerPatcher.hpp b/ControllerPatcher.hpp index 5e1deaa..427859d 100644 --- a/ControllerPatcher.hpp +++ b/ControllerPatcher.hpp @@ -28,29 +28,29 @@ #define _CONTROLLER_PATCHER_H_ #include +#include -#include "./patcher/ControllerPatcherHID.hpp" #include "./patcher/ControllerPatcherDefs.h" -#include "./utils/PadConst.hpp" - -#include "./ConfigReader.hpp" -#include "./config/ConfigValues.hpp" -#include "network/TCPServer.hpp" -#include "network/UDPServer.hpp" -#include "network/UDPClient.hpp" - -#include "dynamic_libs/sys_functions.h" -#include "dynamic_libs/syshid_functions.h" -#include "dynamic_libs/socket_functions.h" -#include "dynamic_libs/padscore_functions.h" -#include "dynamic_libs/vpad_functions.h" -#include "dynamic_libs/padscore_functions.h" - +#include "./utils/ControllerPatcherThread.hpp" #include "./utils/CPRetainVars.hpp" -#include "utils/logger.h" +#include "./utils/PadConst.hpp" #include "./utils/CPStringTools.hpp" +#include "./patcher/ControllerPatcherHID.hpp" +#include "./patcher/ControllerPatcherUtils.hpp" + +#include "./config/ConfigValues.hpp" +#include "./config/ConfigParser.hpp" + +#include "./network/ControllerPatcherNet.hpp" +#include "./network/TCPServer.hpp" +#include "./network/UDPServer.hpp" +#include "./network/UDPClient.hpp" +#include "./ConfigReader.hpp" + +#include "dynamic_libs/vpad_functions.h" + #define HID_DEBUG 0 @@ -238,7 +238,7 @@ class ControllerPatcher{ static void destroyConfigHelper(); static CONTROLLER_PATCHER_RESULT_OR_ERROR doSamplingForDeviceSlot(u16 device_slot); - + static CONTROLLER_PATCHER_RESULT_OR_ERROR setRumbleActivated(bool value); static bool isRumbleActivated(); diff --git a/config/ConfigParser.cpp b/config/ConfigParser.cpp index caf9747..d5439b8 100644 --- a/config/ConfigParser.cpp +++ b/config/ConfigParser.cpp @@ -14,16 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . ****************************************************************************/ +#include "./ConfigParser.hpp" #include #include #include #include -#include "../ConfigReader.hpp" -#include "../utils/CPStringTools.hpp" -#include "./ConfigParser.hpp" -#include "./ConfigValues.hpp" - ConfigParser::ConfigParser(std::string configData){ this->content = configData; this->contentLines = CPStringTools::StringSplit(content, "\n"); diff --git a/config/ConfigParser.hpp b/config/ConfigParser.hpp index 416db14..93207b7 100644 --- a/config/ConfigParser.hpp +++ b/config/ConfigParser.hpp @@ -25,11 +25,8 @@ #include #include "../ControllerPatcher.hpp" -#include "../ConfigReader.hpp" -#include "../utils/PadConst.hpp" #include "utils/logger.h" -#include "../utils/CPRetainVars.hpp" enum PARSE_TYPE{ PARSE_CONTROLLER, diff --git a/config/ConfigValues.cpp b/config/ConfigValues.cpp index b41fead..2868004 100644 --- a/config/ConfigValues.cpp +++ b/config/ConfigValues.cpp @@ -14,11 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . ****************************************************************************/ +#include "./ConfigValues.hpp" #include #include #include -#include "./ConfigValues.hpp" -#include "../utils/CPRetainVars.hpp" + #include "utils/logger.h" ConfigValues *ConfigValues::instance = NULL; diff --git a/config/ConfigValues.hpp b/config/ConfigValues.hpp index 70e32bd..f6c2975 100644 --- a/config/ConfigValues.hpp +++ b/config/ConfigValues.hpp @@ -22,10 +22,8 @@ #include #include -#include "../utils/PadConst.hpp" #include "../ControllerPatcher.hpp" -#include "../utils/CPStringTools.hpp" #include "utils/logger.h" class ConfigValues diff --git a/network/ControllerPatcherNet.cpp b/network/ControllerPatcherNet.cpp index 771a978..7c5f9ed 100644 --- a/network/ControllerPatcherNet.cpp +++ b/network/ControllerPatcherNet.cpp @@ -1,6 +1,6 @@ +#include "ControllerPatcherNet.hpp" #include "dynamic_libs/os_functions.h" #include "dynamic_libs/socket_functions.h" -#include "ControllerPatcherNet.hpp" s32 ControllerPatcherNet::recvwait(s32 sock, void *buffer, s32 len) { s32 ret; diff --git a/network/ControllerPatcherNet.hpp b/network/ControllerPatcherNet.hpp index 800e326..dcebd13 100644 --- a/network/ControllerPatcherNet.hpp +++ b/network/ControllerPatcherNet.hpp @@ -1,6 +1,8 @@ #ifndef _CONTROLLERPATCHERNET_H_ #define _CONTROLLERPATCHERNET_H_ +#include + class ControllerPatcherNet{ friend class TCPServer; friend class UDPServer; diff --git a/network/TCPServer.cpp b/network/TCPServer.cpp index d26efb4..eb92c89 100644 --- a/network/TCPServer.cpp +++ b/network/TCPServer.cpp @@ -15,14 +15,11 @@ * along with this program. If not, see . ****************************************************************************/ #include "TCPServer.hpp" -#include "UDPClient.hpp" #include #include -#include #include -#include "../ControllerPatcher.hpp" -#include "./ControllerPatcherNet.hpp" -#include "../utils/CPRetainVars.hpp" + +#include "utils/logger.h" #define wiiu_errno (*__gh_errno_ptr()) diff --git a/network/TCPServer.hpp b/network/TCPServer.hpp index 4ddbc6a..dec30ef 100644 --- a/network/TCPServer.hpp +++ b/network/TCPServer.hpp @@ -17,9 +17,10 @@ #ifndef _TCPSERVER_WINDOW_H_ #define _TCPSERVER_WINDOW_H_ -#include "../utils/ControllerPatcherThread.hpp" +#include "../ControllerPatcher.hpp" + #include "dynamic_libs/socket_functions.h" -#include "utils/logger.h" +#include "dynamic_libs/os_functions.h" #define WIIU_CP_TCP_HANDSHAKE WIIU_CP_TCP_HANDSHAKE_VERSION_3 diff --git a/network/UDPClient.cpp b/network/UDPClient.cpp index 21ac4d3..6b0c583 100644 --- a/network/UDPClient.cpp +++ b/network/UDPClient.cpp @@ -15,9 +15,11 @@ * along with this program. If not, see . ****************************************************************************/ #include "UDPClient.hpp" -#include #include #include + +#include "utils/logger.h" + #define MAX_UDP_SIZE 0x578 UDPClient * UDPClient::instance = NULL; diff --git a/network/UDPClient.hpp b/network/UDPClient.hpp index e975cdb..d863d36 100644 --- a/network/UDPClient.hpp +++ b/network/UDPClient.hpp @@ -20,10 +20,8 @@ #include #include "../ControllerPatcher.hpp" -#include "../patcher/ControllerPatcherHID.hpp" -#include "../utils/CPRetainVars.hpp" + #include "dynamic_libs/socket_functions.h" -#include "utils/logger.h" #define DEFAULT_UDP_CLIENT_PORT 8114 diff --git a/network/UDPServer.cpp b/network/UDPServer.cpp index 3587e70..2e606cf 100644 --- a/network/UDPServer.cpp +++ b/network/UDPServer.cpp @@ -18,7 +18,10 @@ #include #include #include -#include "../ControllerPatcher.hpp" + +#include "dynamic_libs/socket_functions.h" +#include "utils/logger.h" + #define MAX_UDP_SIZE 0x578 #define wiiu_errno (*__gh_errno_ptr()) diff --git a/network/UDPServer.hpp b/network/UDPServer.hpp index 1be47ab..27d7135 100644 --- a/network/UDPServer.hpp +++ b/network/UDPServer.hpp @@ -17,9 +17,7 @@ #ifndef _UDPSERVER_WINDOW_H_ #define _UDPSERVER_WINDOW_H_ -#include "../utils/ControllerPatcherThread.hpp" -#include "dynamic_libs/socket_functions.h" -#include "utils/logger.h" +#include "../ControllerPatcher.hpp" #define DEFAULT_UDP_PORT 8113 diff --git a/patcher/ControllerPatcherHID.cpp b/patcher/ControllerPatcherHID.cpp index 2ffab2e..e4a9560 100644 --- a/patcher/ControllerPatcherHID.cpp +++ b/patcher/ControllerPatcherHID.cpp @@ -14,14 +14,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . ****************************************************************************/ -#include +#include "ControllerPatcherHID.hpp" + #include #include #include -#include "ControllerPatcherHID.hpp" +#include + #include "dynamic_libs/os_functions.h" -#include "../utils/CPRetainVars.hpp" -#include "../utils/CPStringTools.hpp" + #include "utils/logger.h" /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/patcher/ControllerPatcherHID.hpp b/patcher/ControllerPatcherHID.hpp index b6102f7..e5878a1 100644 --- a/patcher/ControllerPatcherHID.hpp +++ b/patcher/ControllerPatcherHID.hpp @@ -27,12 +27,12 @@ #ifndef _CONTROLLER_PATCHER_HID_H_ #define _CONTROLLER_PATCHER_HID_H_ -#include #include + #include "dynamic_libs/syshid_functions.h" #include "dynamic_libs/vpad_functions.h" -#include "./ControllerPatcherUtils.hpp" -#include "./ControllerPatcherDefs.h" + +#include "../ControllerPatcher.hpp" #define SWAP16(x) ((x>>8) | ((x&0xFF)<<8)) #define SWAP8(x) ((x>>4) | ((x&0xF)<<4)) diff --git a/patcher/ControllerPatcherUtils.cpp b/patcher/ControllerPatcherUtils.cpp index a3370ee..22a316d 100644 --- a/patcher/ControllerPatcherUtils.cpp +++ b/patcher/ControllerPatcherUtils.cpp @@ -14,12 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . ****************************************************************************/ +#include "ControllerPatcherUtils.hpp" #include #include -#include "ControllerPatcherUtils.hpp" -#include "../utils/PadConst.hpp" -#include "utils/logger.h" +#include "utils/logger.h" CONTROLLER_PATCHER_RESULT_OR_ERROR ControllerPatcherUtils::getDataByHandle(s32 handle, my_cb_user ** data){ for(s32 i = 0;i< gHIDMaxDevices;i++){ diff --git a/patcher/ControllerPatcherUtils.hpp b/patcher/ControllerPatcherUtils.hpp index 525723d..bb36271 100644 --- a/patcher/ControllerPatcherUtils.hpp +++ b/patcher/ControllerPatcherUtils.hpp @@ -28,12 +28,12 @@ #define _CONTROLLER_PATCHER_UTIL_H_ #include -#include "../ControllerPatcher.hpp" -#include "./ControllerPatcherHID.hpp" -#include "../utils/CPRetainVars.hpp" + #include "dynamic_libs/vpad_functions.h" #include "dynamic_libs/padscore_functions.h" +#include "../ControllerPatcher.hpp" + class ControllerPatcherUtils{ //give the other classes access to the private functions. friend class ControllerPatcher; diff --git a/utils/CPRetainVars.cpp b/utils/CPRetainVars.cpp index 96bec6f..1bb9dfc 100644 --- a/utils/CPRetainVars.cpp +++ b/utils/CPRetainVars.cpp @@ -15,9 +15,7 @@ * along with this program. If not, see . ****************************************************************************/ #include -#include "../patcher/ControllerPatcherDefs.h" -#include "../network/TCPServer.hpp" -#include "../utils/CPRetainVars.hpp" +#include "../ControllerPatcher.hpp" ControllerMapping gControllerMapping __attribute__((section(".data"))); diff --git a/utils/CPStringTools.cpp b/utils/CPStringTools.cpp index eeaebda..905cb58 100644 --- a/utils/CPStringTools.cpp +++ b/utils/CPStringTools.cpp @@ -1,10 +1,9 @@ +#include "CPStringTools.hpp" #include #include #include #include -#include -#include "CPStringTools.hpp" -#include "PadConst.hpp" + #include #include diff --git a/utils/CPStringTools.hpp b/utils/CPStringTools.hpp index 0ebd220..6335672 100644 --- a/utils/CPStringTools.hpp +++ b/utils/CPStringTools.hpp @@ -2,6 +2,7 @@ #define _CPSTRING_TOOLS_H_ #include #include +#include class CPStringTools{ public: diff --git a/utils/PadConst.cpp b/utils/PadConst.cpp index c3e2002..a4c8858 100644 --- a/utils/PadConst.cpp +++ b/utils/PadConst.cpp @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . ****************************************************************************/ - #include "PadConst.hpp" const u8 DEF_R_STICK = 220;