mirror of
https://github.com/Maschell/hid_to_vpad.git
synced 2024-12-01 02:14:15 +01:00
Remove newlines at the end of logs
This commit is contained in:
parent
2587299615
commit
5cc33ded57
@ -23,12 +23,12 @@
|
|||||||
#include "WUPSConfigItemPadMapping.h"
|
#include "WUPSConfigItemPadMapping.h"
|
||||||
|
|
||||||
void rumbleChanged(WUPSConfigItemBoolean * item, bool newValue) {
|
void rumbleChanged(WUPSConfigItemBoolean * item, bool newValue) {
|
||||||
DEBUG_FUNCTION_LINE("rumbleChanged %d \n",newValue);
|
DEBUG_FUNCTION_LINE("rumbleChanged %d ",newValue);
|
||||||
ControllerPatcher::setRumbleActivated(newValue);
|
ControllerPatcher::setRumbleActivated(newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void networkClient(WUPSConfigItemBoolean * item, bool newValue) {
|
void networkClient(WUPSConfigItemBoolean * item, bool newValue) {
|
||||||
DEBUG_FUNCTION_LINE("Trigger network %d\n",newValue);
|
DEBUG_FUNCTION_LINE("Trigger network %d",newValue);
|
||||||
ControllerPatcher::setNetworkControllerActivated(newValue);
|
ControllerPatcher::setNetworkControllerActivated(newValue);
|
||||||
if(newValue) {
|
if(newValue) {
|
||||||
ControllerPatcher::startNetworkServer();
|
ControllerPatcher::startNetworkServer();
|
||||||
|
@ -68,7 +68,7 @@ DECL_FUNCTION(int32_t, WPADProbe, WPADChan chan, uint32_t * result ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DECL_FUNCTION(WPADConnectCallback,WPADSetConnectCallback,WPADChan chan, WPADConnectCallback callback ) {
|
DECL_FUNCTION(WPADConnectCallback,WPADSetConnectCallback,WPADChan chan, WPADConnectCallback callback ) {
|
||||||
//log_printf("WPADSetConnectCallback chan %d %08X\n",chan,callback);
|
//log_printf("WPADSetConnectCallback chan %d %08X",chan,callback);
|
||||||
|
|
||||||
ControllerPatcher::setWPADConnectCallback(chan,callback);
|
ControllerPatcher::setWPADConnectCallback(chan,callback);
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ DECL_FUNCTION(WPADConnectCallback,WPADSetConnectCallback,WPADChan chan, WPADConn
|
|||||||
}
|
}
|
||||||
|
|
||||||
DECL_FUNCTION(WPADExtensionCallback,WPADSetExtensionCallback,WPADChan chan, WPADExtensionCallback callback ) {
|
DECL_FUNCTION(WPADExtensionCallback,WPADSetExtensionCallback,WPADChan chan, WPADExtensionCallback callback ) {
|
||||||
//log_printf("WPADSetExtensionCallback chan %d %08X\n",chan,callback);
|
//log_printf("WPADSetExtensionCallback chan %d %08X",chan,callback);
|
||||||
|
|
||||||
ControllerPatcher::setKPADExtensionCallback(chan,callback);
|
ControllerPatcher::setKPADExtensionCallback(chan,callback);
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ DECL_FUNCTION(WPADExtensionCallback,WPADSetExtensionCallback,WPADChan chan, WPAD
|
|||||||
}
|
}
|
||||||
|
|
||||||
DECL_FUNCTION(WPADConnectCallback,KPADSetConnectCallback,WPADChan chan, WPADConnectCallback callback ) {
|
DECL_FUNCTION(WPADConnectCallback,KPADSetConnectCallback,WPADChan chan, WPADConnectCallback callback ) {
|
||||||
//log_printf("KPADSetConnectCallback chan %d %08X\n",chan,callback);
|
//log_printf("KPADSetConnectCallback chan %d %08X",chan,callback);
|
||||||
|
|
||||||
ControllerPatcher::setKPADConnectedCallback(chan,callback);
|
ControllerPatcher::setKPADConnectedCallback(chan,callback);
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ DECL_FUNCTION(uint8_t, WPADGetBatteryLevel, WPADChan chan) {
|
|||||||
|
|
||||||
//In case a game relies on this...
|
//In case a game relies on this...
|
||||||
DECL_FUNCTION(uint32_t, WPADGetDataFormat, WPADChan chan) {
|
DECL_FUNCTION(uint32_t, WPADGetDataFormat, WPADChan chan) {
|
||||||
//log_printf("WPADGetDataFormat chan: %d result: %d\n",chan,result);
|
//log_printf("WPADGetDataFormat chan: %d result: %d",chan,result);
|
||||||
if((chan == WPAD_CHAN_0 && ControllerPatcher::isControllerConnectedAndActive(UController_Type_Pro1)) ||
|
if((chan == WPAD_CHAN_0 && ControllerPatcher::isControllerConnectedAndActive(UController_Type_Pro1)) ||
|
||||||
(chan == WPAD_CHAN_1 && ControllerPatcher::isControllerConnectedAndActive(UController_Type_Pro2)) ||
|
(chan == WPAD_CHAN_1 && ControllerPatcher::isControllerConnectedAndActive(UController_Type_Pro2)) ||
|
||||||
(chan == WPAD_CHAN_2 && ControllerPatcher::isControllerConnectedAndActive(UController_Type_Pro3)) ||
|
(chan == WPAD_CHAN_2 && ControllerPatcher::isControllerConnectedAndActive(UController_Type_Pro3)) ||
|
||||||
|
@ -115,12 +115,12 @@ void WUPSConfigItemPadMapping::checkForInput() {
|
|||||||
|
|
||||||
int32_t result = ControllerPatcher::gettingInputAllDevices(hiddata,inputsize);
|
int32_t result = ControllerPatcher::gettingInputAllDevices(hiddata,inputsize);
|
||||||
if(result > 0) {
|
if(result > 0) {
|
||||||
//log_printf("got %d results\n",result);
|
//log_printf("got %d results",result);
|
||||||
for(int32_t i =0; i<result; i++) {
|
for(int32_t i =0; i<result; i++) {
|
||||||
for(int32_t j = 0; j<HID_MAX_PADS_COUNT; j++) {
|
for(int32_t j = 0; j<HID_MAX_PADS_COUNT; j++) {
|
||||||
//log_printf("check pad %d. %08X\n",j,hiddata[i].button_data[j].btn_h);
|
//log_printf("check pad %d. %08X",j,hiddata[i].button_data[j].btn_h);
|
||||||
if(hiddata[i].button_data[j].btn_h != 0) {
|
if(hiddata[i].button_data[j].btn_h != 0) {
|
||||||
//log_printf("It pressed a buttons!\n",result);
|
//log_printf("It pressed a buttons!",result);
|
||||||
pad_result.pad = j;
|
pad_result.pad = j;
|
||||||
pad_result.vidpid.vid = hiddata[i].device_info.vidpid.vid;
|
pad_result.vidpid.vid = hiddata[i].device_info.vidpid.vid;
|
||||||
pad_result.vidpid.pid = hiddata[i].device_info.vidpid.pid;
|
pad_result.vidpid.pid = hiddata[i].device_info.vidpid.pid;
|
||||||
@ -128,7 +128,7 @@ void WUPSConfigItemPadMapping::checkForInput() {
|
|||||||
pad_result.type = hiddata[i].type;
|
pad_result.type = hiddata[i].type;
|
||||||
|
|
||||||
gotPress = true;
|
gotPress = true;
|
||||||
DEBUG_FUNCTION_LINE("%04X %04X (PAD: %d) pressed a buttons %08X\n",hiddata[i].device_info.vidpid.vid,hiddata[i].device_info.vidpid.pid,j,hiddata[i].button_data[j].btn_h);
|
DEBUG_FUNCTION_LINE("%04X %04X (PAD: %d) pressed a buttons %08X",hiddata[i].device_info.vidpid.vid,hiddata[i].device_info.vidpid.pid,j,hiddata[i].button_data[j].btn_h);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
src/main.cpp
12
src/main.cpp
@ -41,10 +41,10 @@ ON_APPLICATION_START(args) {
|
|||||||
socket_lib_init();
|
socket_lib_init();
|
||||||
log_init();
|
log_init();
|
||||||
|
|
||||||
DEBUG_FUNCTION_LINE("Initializing the controller data\n");
|
DEBUG_FUNCTION_LINE("Initializing the controller data");
|
||||||
ControllerPatcher::Init(CONTROLLER_PATCHER_PATH);
|
ControllerPatcher::Init(CONTROLLER_PATCHER_PATH);
|
||||||
ControllerPatcher::enableControllerMapping();
|
ControllerPatcher::enableControllerMapping();
|
||||||
DEBUG_FUNCTION_LINE("Starting HID to VPAD network server\n");
|
DEBUG_FUNCTION_LINE("Starting HID to VPAD network server");
|
||||||
ControllerPatcher::startNetworkServer();
|
ControllerPatcher::startNetworkServer();
|
||||||
ControllerPatcher::disableWiiUEnergySetting();
|
ControllerPatcher::disableWiiUEnergySetting();
|
||||||
}
|
}
|
||||||
@ -57,13 +57,13 @@ DEINITIALIZE_PLUGIN() {
|
|||||||
|
|
||||||
ON_APPLICATION_END() {
|
ON_APPLICATION_END() {
|
||||||
//CursorDrawer::destroyInstance();
|
//CursorDrawer::destroyInstance();
|
||||||
DEBUG_FUNCTION_LINE("ON_APPLICATION_ENDING\n");
|
DEBUG_FUNCTION_LINE("ON_APPLICATION_ENDING");
|
||||||
ControllerPatcher::destroyConfigHelper();
|
ControllerPatcher::destroyConfigHelper();
|
||||||
DEBUG_FUNCTION_LINE("Calling stopNetworkServer\n");
|
DEBUG_FUNCTION_LINE("Calling stopNetworkServer");
|
||||||
ControllerPatcher::stopNetworkServer();
|
ControllerPatcher::stopNetworkServer();
|
||||||
DEBUG_FUNCTION_LINE("Calling resetCallbackData\n");
|
DEBUG_FUNCTION_LINE("Calling resetCallbackData");
|
||||||
ControllerPatcher::resetCallbackData();
|
ControllerPatcher::resetCallbackData();
|
||||||
ControllerPatcher::restoreWiiUEnergySetting();
|
ControllerPatcher::restoreWiiUEnergySetting();
|
||||||
|
|
||||||
DEBUG_FUNCTION_LINE("Closing\n");
|
DEBUG_FUNCTION_LINE("Closing");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user