2016-08-03 20:46:46 +02:00
|
|
|
/****************************************************************************
|
2017-03-30 17:53:36 +02:00
|
|
|
* Copyright (C) 2016,2017 Maschell
|
2016-08-03 20:46:46 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
****************************************************************************/
|
2017-05-07 14:44:09 +02:00
|
|
|
#include "../ControllerPatcher.hpp"
|
2017-03-30 17:53:36 +02:00
|
|
|
|
|
|
|
ControllerMapping gControllerMapping __attribute__((section(".data")));
|
2016-04-25 20:23:58 +02:00
|
|
|
|
2016-08-03 20:46:46 +02:00
|
|
|
u8 gConfig_done __attribute__((section(".data"))) = 0;
|
|
|
|
u8 gButtonRemappingConfigDone __attribute__((section(".data"))) = 0;
|
2016-04-25 20:23:58 +02:00
|
|
|
|
2017-04-10 17:15:26 +02:00
|
|
|
u32 gHIDAttached __attribute__((section(".data"))) = 0;
|
|
|
|
u32 gHIDCurrentDevice __attribute__((section(".data"))) = 0;
|
2016-04-25 20:23:58 +02:00
|
|
|
|
2016-08-03 20:46:46 +02:00
|
|
|
u16 gHIDRegisteredDevices __attribute__((section(".data"))) = 0;
|
|
|
|
|
2016-04-25 20:23:58 +02:00
|
|
|
HIDClient gHIDClient __attribute__((section(".data")));
|
|
|
|
|
2016-08-03 20:46:46 +02:00
|
|
|
HID_DEVICE_DATA gHID_Devices[gHIDMaxDevices] __attribute__((section(".data")));
|
2016-04-25 20:23:58 +02:00
|
|
|
|
|
|
|
u8 gHID_Mouse_Mode __attribute__((section(".data"))) = HID_MOUSE_MODE_TOUCH;
|
|
|
|
|
2016-08-03 20:46:46 +02:00
|
|
|
u32 gGamePadValues[CONTRPS_MAX_VALUE] __attribute__((section(".data")));
|
|
|
|
|
2017-03-30 17:53:36 +02:00
|
|
|
u8 config_controller[gHIDMaxDevices][CONTRPS_MAX_VALUE][2] __attribute__((section(".data")));
|
2017-04-10 17:15:26 +02:00
|
|
|
u32 config_controller_hidmask[gHIDMaxDevices] __attribute__((section(".data")));
|
2016-08-03 20:46:46 +02:00
|
|
|
|
2017-04-10 17:15:26 +02:00
|
|
|
u32 gHID_LIST_GC __attribute__((section(".data"))) = 0;
|
|
|
|
u32 gHID_LIST_DS3 __attribute__((section(".data"))) = 0;
|
2017-04-23 15:19:21 +02:00
|
|
|
u32 gHID_LIST_DS4 __attribute__((section(".data"))) = 0;
|
2017-04-10 17:15:26 +02:00
|
|
|
u32 gHID_LIST_KEYBOARD __attribute__((section(".data"))) = 0;
|
2017-04-23 12:18:36 +02:00
|
|
|
u32 gHID_LIST_SWITCH_PRO __attribute__((section(".data"))) = 0;
|
2017-04-10 17:15:26 +02:00
|
|
|
u32 gHID_LIST_MOUSE __attribute__((section(".data"))) = 0;
|
2016-08-03 20:46:46 +02:00
|
|
|
|
|
|
|
u16 gGamePadSlot __attribute__((section(".data"))) = 0;
|
|
|
|
u16 gHID_SLOT_GC __attribute__((section(".data"))) = 0;
|
|
|
|
u16 gHID_SLOT_KEYBOARD __attribute__((section(".data"))) = 0;
|
|
|
|
u16 gMouseSlot __attribute__((section(".data"))) = 0;
|
2017-03-30 17:53:36 +02:00
|
|
|
|
|
|
|
u8 gOriginalDimState __attribute__((section(".data"))) = 0;
|
|
|
|
u8 gOriginalAPDState __attribute__((section(".data"))) = 0;
|
|
|
|
|
|
|
|
u16 gNetworkController[gHIDMaxDevices][HID_MAX_PADS_COUNT][4] __attribute__((section(".data")));
|
|
|
|
s32 gHIDNetworkClientID __attribute__((section(".data"))) = 0;
|
2017-04-10 15:39:58 +02:00
|
|
|
u8 gUsedProtocolVersion __attribute__((section(".data"))) = WIIU_CP_TCP_HANDSHAKE;
|
2017-04-13 10:14:41 +02:00
|
|
|
|
2017-04-14 12:59:40 +02:00
|
|
|
wpad_connect_callback_t gWPADConnectCallback[4] __attribute__((section(".data")));
|
|
|
|
wpad_connect_callback_t gKPADConnectCallback[4] __attribute__((section(".data")));
|
2017-04-13 10:14:41 +02:00
|
|
|
wpad_extension_callback_t gExtensionCallback[4] __attribute__((section(".data")));
|
2017-04-23 15:19:21 +02:00
|
|
|
wpad_sampling_callback_t gSamplingCallback __attribute__((section(".data"))) = 0;
|
2017-04-13 15:30:40 +02:00
|
|
|
u8 gCallbackCooldown __attribute__((section(".data"))) = 0;
|
|
|
|
|
2017-05-07 14:29:19 +02:00
|
|
|
u8 gGlobalRumbleActivated __attribute__((section(".data"))) = 0;
|
|
|
|
|
2017-05-20 19:22:16 +02:00
|
|
|
my_cb_user * connectionOrderHelper[gHIDMaxDevices] __attribute__((section(".data")));
|
|
|
|
|
2017-04-13 15:30:40 +02:00
|
|
|
u32 gUDPClientip __attribute__((section(".data"))) = 0;
|
2017-04-23 15:19:21 +02:00
|
|
|
ControllerMappingPADInfo* gProPadInfo[4] __attribute__((section(".data"))) = {&gControllerMapping.proController[0].pad_infos[0],
|
|
|
|
&gControllerMapping.proController[1].pad_infos[0],
|
|
|
|
&gControllerMapping.proController[2].pad_infos[0],
|
|
|
|
&gControllerMapping.proController[3].pad_infos[0]} ;
|