TwlBkpImporterForWPS:TwlBkpImportWithPrivateSave 版の追加。

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_test_tools@23 6b0af911-cb57-b745-895f-eec5701120e1
This commit is contained in:
n2460 2011-10-19 00:47:45 +00:00
parent 4e8f94696c
commit 0dfff01149
3 changed files with 53 additions and 1 deletions

View File

@ -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();
// 初期化

View File

@ -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;

View File

@ -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 ビルドでは nn::dbg::xxx が使用できないため、release ならビルドしない
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)