Cleaned up the includes

This commit is contained in:
Maschell 2017-05-07 14:44:09 +02:00
parent 9119528a1b
commit 3559a18408
24 changed files with 71 additions and 82 deletions

View File

@ -14,14 +14,15 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include "./ConfigReader.hpp"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <map>
#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;

View File

@ -17,19 +17,11 @@
#ifndef _ConfigReader_H_
#define _ConfigReader_H_
#include <gctypes.h>
#include <string>
#include <vector>
#include <map>
#include <stdio.h>
#include <gctypes.h>
#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";

View File

@ -14,13 +14,20 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include "ControllerPatcher.hpp"
#include <malloc.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <vector>
#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;

View File

@ -28,29 +28,29 @@
#define _CONTROLLER_PATCHER_H_
#include <gctypes.h>
#include <string>
#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

View File

@ -14,16 +14,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include "./ConfigParser.hpp"
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#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");

View File

@ -25,11 +25,8 @@
#include <gctypes.h>
#include "../ControllerPatcher.hpp"
#include "../ConfigReader.hpp"
#include "../utils/PadConst.hpp"
#include "utils/logger.h"
#include "../utils/CPRetainVars.hpp"
enum PARSE_TYPE{
PARSE_CONTROLLER,

View File

@ -14,11 +14,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include "./ConfigValues.hpp"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "./ConfigValues.hpp"
#include "../utils/CPRetainVars.hpp"
#include "utils/logger.h"
ConfigValues *ConfigValues::instance = NULL;

View File

@ -22,10 +22,8 @@
#include <map>
#include <gctypes.h>
#include "../utils/PadConst.hpp"
#include "../ControllerPatcher.hpp"
#include "../utils/CPStringTools.hpp"
#include "utils/logger.h"
class ConfigValues

View File

@ -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;

View File

@ -1,6 +1,8 @@
#ifndef _CONTROLLERPATCHERNET_H_
#define _CONTROLLERPATCHERNET_H_
#include<gctypes.h>
class ControllerPatcherNet{
friend class TCPServer;
friend class UDPServer;

View File

@ -15,14 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include "TCPServer.hpp"
#include "UDPClient.hpp"
#include <malloc.h>
#include <stdio.h>
#include <sys/time.h>
#include <string.h>
#include "../ControllerPatcher.hpp"
#include "./ControllerPatcherNet.hpp"
#include "../utils/CPRetainVars.hpp"
#include "utils/logger.h"
#define wiiu_errno (*__gh_errno_ptr())

View File

@ -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

View File

@ -15,9 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include "UDPClient.hpp"
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include "utils/logger.h"
#define MAX_UDP_SIZE 0x578
UDPClient * UDPClient::instance = NULL;

View File

@ -20,10 +20,8 @@
#include <gctypes.h>
#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

View File

@ -18,7 +18,10 @@
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include "../ControllerPatcher.hpp"
#include "dynamic_libs/socket_functions.h"
#include "utils/logger.h"
#define MAX_UDP_SIZE 0x578
#define wiiu_errno (*__gh_errno_ptr())

View File

@ -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

View File

@ -14,14 +14,15 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include <vector>
#include "ControllerPatcherHID.hpp"
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include "ControllerPatcherHID.hpp"
#include <gctypes.h>
#include "dynamic_libs/os_functions.h"
#include "../utils/CPRetainVars.hpp"
#include "../utils/CPStringTools.hpp"
#include "utils/logger.h"
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -27,12 +27,12 @@
#ifndef _CONTROLLER_PATCHER_HID_H_
#define _CONTROLLER_PATCHER_HID_H_
#include <gctypes.h>
#include <vector>
#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))

View File

@ -14,12 +14,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include "ControllerPatcherUtils.hpp"
#include <math.h>
#include <string.h>
#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++){

View File

@ -28,12 +28,12 @@
#define _CONTROLLER_PATCHER_UTIL_H_
#include <gctypes.h>
#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;

View File

@ -15,9 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include <gctypes.h>
#include "../patcher/ControllerPatcherDefs.h"
#include "../network/TCPServer.hpp"
#include "../utils/CPRetainVars.hpp"
#include "../ControllerPatcher.hpp"
ControllerMapping gControllerMapping __attribute__((section(".data")));

View File

@ -1,10 +1,9 @@
#include "CPStringTools.hpp"
#include <string>
#include <vector>
#include <stdio.h>
#include <string.h>
#include <gctypes.h>
#include "CPStringTools.hpp"
#include "PadConst.hpp"
#include <stdarg.h>
#include <stdlib.h>

View File

@ -2,6 +2,7 @@
#define _CPSTRING_TOOLS_H_
#include <string>
#include <vector>
#include <gctypes.h>
class CPStringTools{
public:

View File

@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include "PadConst.hpp"
const u8 DEF_R_STICK = 220;