From 9b2fa4fac305785d9c2ac36922f73b6c2acd2fed Mon Sep 17 00:00:00 2001 From: N2614 Date: Thu, 24 Feb 2011 06:04:03 +0000 Subject: [PATCH] =?UTF-8?q?=E3=82=BF=E3=83=83=E3=83=81=E3=83=91=E3=83=8D?= =?UTF-8?q?=E3=83=AB=E3=81=AEcal=E5=80=A4=E3=81=8C=E5=87=BA=E5=8A=9B?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=A6=E3=81=84=E3=82=8B=E3=81=A8=E3=81=8D?= =?UTF-8?q?=E3=81=AE=E3=81=BFcal=E5=80=A4=E3=82=92=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../ConsoleRestore/Importer.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/trunk/ConsoleDataMigration/ConsoleRestore/Importer.cpp b/trunk/ConsoleDataMigration/ConsoleRestore/Importer.cpp index 11b4898..0e81600 100644 --- a/trunk/ConsoleDataMigration/ConsoleRestore/Importer.cpp +++ b/trunk/ConsoleDataMigration/ConsoleRestore/Importer.cpp @@ -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);