mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
タッチパネルのcal値が出力されているときのみcal値を設定するように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@91 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
908a485786
commit
9b2fa4fac3
@ -1386,11 +1386,12 @@ void ExportTouchPanelCfgData()
|
||||
common::SdMountManager::Unmount();
|
||||
}
|
||||
|
||||
void ImportTouchPanelCfgData(nn::cfg::CTR::detail::TouchPanelCfgData* data)
|
||||
bool ImportTouchPanelCfgData(nn::cfg::CTR::detail::TouchPanelCfgData* data)
|
||||
{
|
||||
using namespace nn::cfg::CTR::detail;
|
||||
|
||||
nn::Result result;
|
||||
bool retval = false;
|
||||
|
||||
COMMON_LOGGER("Import TouchPanelData\n");
|
||||
|
||||
@ -1408,6 +1409,7 @@ void ImportTouchPanelCfgData(nn::cfg::CTR::detail::TouchPanelCfgData* data)
|
||||
{
|
||||
// SDから読み出し成功
|
||||
std::memcpy(data, buf, readSize);
|
||||
retval = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1417,17 +1419,20 @@ void ImportTouchPanelCfgData(nn::cfg::CTR::detail::TouchPanelCfgData* data)
|
||||
}
|
||||
|
||||
common::SdMountManager::Unmount();
|
||||
return retval;
|
||||
}
|
||||
|
||||
void InitializeHardwareDependentSetting()
|
||||
{
|
||||
using namespace nn::cfg::CTR::detail;
|
||||
nn::Result result;
|
||||
nn::Result result = nn::ResultSuccess();
|
||||
|
||||
nn::cfg::CTR::detail::TouchPanelCfgData touchPanelCfgData;
|
||||
ImportTouchPanelCfgData(&touchPanelCfgData);
|
||||
result = nn::cfg::CTR::init::SetConfig(GET_CFG_KEY(NN_CFG_HID, NN_CFG_HID_CAL_TOUCHPANEL), &touchPanelCfgData,
|
||||
sizeof(TouchPanelCfgData));
|
||||
if(ImportTouchPanelCfgData(&touchPanelCfgData))
|
||||
{
|
||||
result = nn::cfg::CTR::init::SetConfig(GET_CFG_KEY(NN_CFG_HID, NN_CFG_HID_CAL_TOUCHPANEL), &touchPanelCfgData,
|
||||
sizeof(TouchPanelCfgData));
|
||||
}
|
||||
|
||||
COMMON_LOGGER_RESULT_IF_FAILED_WITH_LINE(result);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user