1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: main.cpp 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 46365 $ 14 *---------------------------------------------------------------------------*/ 15 16 #include <nn/applet.h> 17 18 #include "FsSample.h" 19 #include "FsSampleArchive.h" 20 #include "FsSampleFile.h" 21 22 nnMain(void)23extern "C" void nnMain( void ) 24 { 25 // Call only the nn::applet::Enable function to also allow execution from the HOME Menu 26 // HOME Menu transitions, POWER Button presses, and sleep are all unsupported 27 nn::applet::Enable(); 28 29 NN_LOG("=== fs sample demo start ===\n"); 30 31 FsSampleInitialize(); 32 33 FsSampleCheckSaveData(); 34 35 if(FsSampleMountRom()) 36 { 37 FsSampleReadRomFile(); 38 } 39 40 if(FsSampleMountSaveData()) 41 { 42 FsSampleCreateSaveDataFile(); 43 FsSampleReadSaveDataFile(); 44 } 45 46 if(FsSampleMountExtSaveData()) 47 { 48 FsSampleCreateExtSaveDataFile(); 49 FsSampleReadExtSaveDataFile(); 50 } 51 52 if(FsSampleMountSdmcWriteOnly()) 53 { 54 FsSampleCreateSdmcWriteOnlyFile(); 55 } 56 57 FsSampleUnmountRom(); 58 FsSampleUnmountSaveData(); 59 FsSampleUnmountExtSaveData(); 60 FsSampleUnmountSdmcWriteOnly(); 61 FsSampleFinalize(); 62 63 NN_LOG("=== fs sample demo end ===\n"); 64 } 65