mirror of
https://github.com/Maschell/controller_patcher.git
synced 2024-11-22 03:59:16 +01:00
Added option to disable the network controller
This commit is contained in:
parent
f8aa5558cd
commit
718ac61d77
@ -529,11 +529,14 @@ bool ControllerPatcher::Init(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ControllerPatcher::startNetworkServer(){
|
void ControllerPatcher::startNetworkServer(){
|
||||||
|
if(!gNetworkControllerActivated) return;
|
||||||
|
log_printf("ControllerPatcher::startNetworkServer(line %d) statedNetworkServer! \n",__LINE__);
|
||||||
UDPServer::getInstance();
|
UDPServer::getInstance();
|
||||||
TCPServer::getInstance();
|
TCPServer::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControllerPatcher::stopNetworkServer(){
|
void ControllerPatcher::stopNetworkServer(){
|
||||||
|
log_printf("ControllerPatcher::stopNetworkServer(line %d) called! \n",__LINE__);
|
||||||
UDPServer::destroyInstance();
|
UDPServer::destroyInstance();
|
||||||
UDPClient::destroyInstance();
|
UDPClient::destroyInstance();
|
||||||
TCPServer::destroyInstance();
|
TCPServer::destroyInstance();
|
||||||
@ -1062,6 +1065,11 @@ CONTROLLER_PATCHER_RESULT_OR_ERROR ControllerPatcher::setRumbleActivated(bool va
|
|||||||
return CONTROLLER_PATCHER_ERROR_NONE;
|
return CONTROLLER_PATCHER_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CONTROLLER_PATCHER_RESULT_OR_ERROR ControllerPatcher::setNetworkControllerActivated(bool value){
|
||||||
|
gNetworkControllerActivated = value;
|
||||||
|
return CONTROLLER_PATCHER_ERROR_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
bool ControllerPatcher::isRumbleActivated(){
|
bool ControllerPatcher::isRumbleActivated(){
|
||||||
return gGlobalRumbleActivated;
|
return gGlobalRumbleActivated;
|
||||||
}
|
}
|
||||||
|
@ -241,6 +241,8 @@ class ControllerPatcher{
|
|||||||
|
|
||||||
static CONTROLLER_PATCHER_RESULT_OR_ERROR setRumbleActivated(bool value);
|
static CONTROLLER_PATCHER_RESULT_OR_ERROR setRumbleActivated(bool value);
|
||||||
|
|
||||||
|
static CONTROLLER_PATCHER_RESULT_OR_ERROR setNetworkControllerActivated(bool value);
|
||||||
|
|
||||||
static bool isRumbleActivated();
|
static bool isRumbleActivated();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ wpad_extension_callback_t gExtensionCallback[4] __attribute__((section(".data"))
|
|||||||
wpad_sampling_callback_t gSamplingCallback __attribute__((section(".data"))) = 0;
|
wpad_sampling_callback_t gSamplingCallback __attribute__((section(".data"))) = 0;
|
||||||
u8 gCallbackCooldown __attribute__((section(".data"))) = 0;
|
u8 gCallbackCooldown __attribute__((section(".data"))) = 0;
|
||||||
u8 gAppStatus __attribute__((section(".data"))) = 0;
|
u8 gAppStatus __attribute__((section(".data"))) = 0;
|
||||||
|
u8 gNetworkControllerActivated __attribute__((section(".data"))) = 1;
|
||||||
|
|
||||||
u8 gGlobalRumbleActivated __attribute__((section(".data"))) = 0;
|
u8 gGlobalRumbleActivated __attribute__((section(".data"))) = 0;
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@ extern wpad_sampling_callback_t gSamplingCallback;
|
|||||||
extern u8 gCallbackCooldown;
|
extern u8 gCallbackCooldown;
|
||||||
extern u8 gGlobalRumbleActivated;
|
extern u8 gGlobalRumbleActivated;
|
||||||
extern u8 gAppStatus;
|
extern u8 gAppStatus;
|
||||||
|
extern u8 gNetworkControllerActivated;
|
||||||
|
|
||||||
extern u32 gUDPClientip;
|
extern u32 gUDPClientip;
|
||||||
extern ControllerMappingPADInfo* gProPadInfo[4];
|
extern ControllerMappingPADInfo* gProPadInfo[4];
|
||||||
|
Loading…
Reference in New Issue
Block a user