1
0
mirror of https://github.com/cathery/sys-con.git synced 2024-12-24 15:13:45 +00:00

Comment out unused code for now

This commit is contained in:
cathery 2019-11-05 14:16:58 +03:00
parent cc1e83e954
commit e212c27789
4 changed files with 11 additions and 52 deletions

View File

@ -19,6 +19,8 @@ Result SwitchAbstractedPadHandler::Initialize()
if (R_FAILED(rc))
return rc;
/*
hidScanInput();
HidControllerID lastOfflineID = CONTROLLER_PLAYER_1;
for (int i = 0; i != 8; ++i)
@ -30,11 +32,13 @@ Result SwitchAbstractedPadHandler::Initialize()
}
}
//WriteToLog("Found last offline ID: ", lastOfflineID);
*/
rc = InitAbstractedPadState();
if (R_FAILED(rc))
return rc;
/*
svcSleepThread(1e+7L);
hidScanInput();
@ -43,33 +47,10 @@ Result SwitchAbstractedPadHandler::Initialize()
Result rc2 = hidInitializeVibrationDevices(&m_vibrationDeviceHandle, 1, lastOfflineID, hidGetControllerType(lastOfflineID));
if (R_SUCCEEDED(rc2))
{
/*
u32 tmp_type = 0x20;
m_vibrationDeviceHandle = tmp_type | (lastOfflineID & 0xff) << 8;
WriteToLog("Initializing vibration device with handle ", m_vibrationDeviceHandle);
Service IActiveVibrationDeviceList;
if (R_SUCCEEDED(serviceDispatch(hidGetServiceSession(), 203, .out_num_objects = 1, .out_objects = &IActiveVibrationDeviceList)))
{
WriteToLog("Got vibration device list object_id ", IActiveVibrationDeviceList.object_id);
Result rc69 = serviceDispatchIn(&IActiveVibrationDeviceList, 0, m_vibrationDeviceHandle);
serviceClose(&IActiveVibrationDeviceList);
if (R_SUCCEEDED(rc69))
{
WriteToLog("Activated vibration handle");
InitOutputThread();
}
else
WriteToLog("Failed to activate handle, result: ", rc69);
}
*/
InitOutputThread();
}
else
WriteToLog("Failed to iniitalize vibration device with error ", rc2);
*/
InitInputThread();
return rc;

View File

@ -18,6 +18,7 @@ Result SwitchHDLHandler::Initialize()
if (R_FAILED(rc))
return rc;
/*
hidScanInput();
HidControllerID lastOfflineID = CONTROLLER_PLAYER_1;
for (int i = 0; i != 8; ++i)
@ -29,11 +30,13 @@ Result SwitchHDLHandler::Initialize()
}
}
//WriteToLog("Found last offline ID: ", lastOfflineID);
*/
rc = InitHdlState();
if (R_FAILED(rc))
return rc;
/*
svcSleepThread(1e+7L);
hidScanInput();
@ -42,32 +45,10 @@ Result SwitchHDLHandler::Initialize()
Result rc2 = hidInitializeVibrationDevices(&m_vibrationDeviceHandle, 1, lastOfflineID, hidGetControllerType(lastOfflineID));
if (R_SUCCEEDED(rc2))
{
/*
m_vibrationDeviceHandle = 3 | (lastOfflineID & 0xff) << 8;
WriteToLog("Initializing vibration device with handle ", m_vibrationDeviceHandle);
Service IActiveVibrationDeviceList;
WriteToLog("Got vibration device list object_id ", IActiveVibrationDeviceList.object_id);
if (R_SUCCEEDED(serviceDispatch(hidGetServiceSession(), 203, .out_num_objects = 1, .out_objects = &IActiveVibrationDeviceList)))
{
WriteToLog("Got vibration device list object_id ", IActiveVibrationDeviceList.object_id);
Result rc69 = serviceDispatchIn(&IActiveVibrationDeviceList, 0, m_vibrationDeviceHandle);
serviceClose(&IActiveVibrationDeviceList);
if (R_SUCCEEDED(rc69))
{
WriteToLog("Activated vibration handle");
InitOutputThread();
}
else
WriteToLog("Failed to activate handle, result: ", rc69);
}
*/
InitOutputThread();
}
else
WriteToLog("Failed to iniitalize vibration with error ", rc2);
*/
InitInputThread();

View File

@ -58,10 +58,6 @@ extern "C"
if (R_FAILED(rc))
fatalThrow(rc);
rc = usbCommsInitialize();
if (R_FAILED(rc))
fatalThrow(rc);
#ifndef __APPLET__
rc = hidInitialize();
if (R_FAILED(rc))
@ -74,7 +70,6 @@ extern "C"
#ifndef __APPLET__
hidExit();
#endif
usbCommsExit();
usbHsExit();
hiddbgReleaseHdlsWorkBuffer();
hiddbgExit();

View File

@ -72,6 +72,7 @@ Result mainLoop()
}
}
}
/*
if (kDown & KEY_X)
{
@ -102,6 +103,7 @@ Result mainLoop()
WriteToLog("failed to check for vibration device");
}
}
*/
if (kDown & KEY_B)
break;