diff --git a/TwlBkpCheck/CTR/TwlBkpImporter/main.cpp b/TwlBkpCheck/CTR/TwlBkpImporter/main.cpp index 41b9ddc..c7dc616 100644 --- a/TwlBkpCheck/CTR/TwlBkpImporter/main.cpp +++ b/TwlBkpCheck/CTR/TwlBkpImporter/main.cpp @@ -201,7 +201,11 @@ void Update(nn::hid::PadStatus& status) extern "C" void nnMain( void ) { - NN_LOG("DSiWare SD Card Export and Import Test\n"); +#ifndef TWL_BKP_WPS + NN_LOG("TwlBkpImpoerter.\n"); +#else + NN_LOG("TwlBkpImporterWithPrivateSave.\n"); +#endif TransitionHandler::Initialize(); // εˆζœŸεŒ– diff --git a/TwlBkpCheck/CTR/TwlBkpImporter/sdAccessor.cpp b/TwlBkpCheck/CTR/TwlBkpImporter/sdAccessor.cpp index f809a9c..34730b4 100644 --- a/TwlBkpCheck/CTR/TwlBkpImporter/sdAccessor.cpp +++ b/TwlBkpCheck/CTR/TwlBkpImporter/sdAccessor.cpp @@ -117,7 +117,11 @@ void SdAccessor::Import(u16 index,bit8* addrForAm) { std::wcscpy(mBinaryName, mFileName); std::wcscat(mBinaryName, mBinary.binaryType[index].directoryEntry.entryName); +#ifndef TWL_BKP_WITH_PRIVATE_SAVE mBinary.binaryType[index].result = nn::am::ImportTwlBackup(mBinaryName, addrForAm); +#else + mBinary.binaryType[index].result = nn::am::ImportTwlBackupWithPrivateSave(mBinaryName, addrForAm); +#endif if(mBinary.binaryType[index].result.GetPrintableBits() == CLEAR || mBinary.binaryType[index].result.GetPrintableBits() == CLEAR_INFO) { mBinary.binaryType[index].state = IMPORTED_CLEAR; diff --git a/TwlBkpCheck/CTR/TwlBkpImporterForWPS/OMakefile b/TwlBkpCheck/CTR/TwlBkpImporterForWPS/OMakefile new file mode 100644 index 0000000..3d5a11a --- /dev/null +++ b/TwlBkpCheck/CTR/TwlBkpImporterForWPS/OMakefile @@ -0,0 +1,44 @@ +#!/usr/bin/env omake +#---------------------------------------------------------------------------- +# Project: Horizon +# File: OMakefile +# +# Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. +# +# These coded instructions, statements, and computer programs contain +# proprietary information of Nintendo of America Inc. and/or Nintendo +# Company Ltd., and are protected by Federal copyright law. They may +# not be disclosed to third parties or copied or duplicated in any form, +# in whole or in part, without the prior written consent of Nintendo. +# +# $Rev$ +#---------------------------------------------------------------------------- +SUPPORTED_TARGETS = CTR-T*.Process.MPCore.* + +# release ƒrƒ‹ƒh‚Ε‚Ν nn::dbg::xxx ‚ͺŽg—p‚Ε‚«‚Θ‚’‚½‚߁Arelease ‚Θ‚ηƒrƒ‹ƒh‚΅‚Θ‚’ +TARGET_BUILDTYPES = $(filter Development Debug, $(TARGET_BUILDTYPES)) + +SAMPLE_DEMOS_DIR = $(dir $(CTRSDK_ROOT)/../CTR/SampleDemos) +SAMPLE_DEMOS_COMMON_INCLUDE_DIR = $(dir $(SAMPLE_DEMOS_DIR)/common/include) +INCLUDES += $(SAMPLE_DEMOS_COMMON_INCLUDE_DIR) + +TWL_BKP_IMPORTER_DIR = ../TwlBkpImporter + +SOURCES[] = + $(TWL_BKP_IMPORTER_DIR)/main.cpp + $(TWL_BKP_IMPORTER_DIR)/draw.cpp + $(TWL_BKP_IMPORTER_DIR)/sdAccessor.cpp + $(TWL_BKP_IMPORTER_DIR)/window.cpp + +TARGET_PROGRAM = twlBkpImporterForWPS + +LIBS += libnn_am lib_demo lib_applet + +ROM_SPEC_FILE = $(TWL_BKP_IMPORTER_DIR)/twlBkpImporter.rsf +DESCRIPTOR = $(HORIZON_ROOT)/resources/specfiles/systemapplications/Mset.desc + +CCFLAGS += -DTWL_BKP_WITH_PRIVATE_SAVE + +include $(ROOT_OMAKE)/modulerules + +build: $(DEFAULT_TARGETS)