SAVEInit

Syntax

#include <nn/save.h>

SAVEStatus SAVEInit( void );

Parameters

None.

Return Values

Synchronous API: Return Value; Asynchronous API: Callback Return Value

SAVE_STATUS_OK Successfully initialized. SAVE_STATUS_OK is the same as FS_STATUS_OK.
SAVE_STATUS_FATAL_ERROR Fatal error occurred. This error is not returned to the application. The application does not need to process this fatal error. Instead, the fatal error message is shown on the TV screen.

Description

Initializes the SAVE library. This function must be called before any other SAVE functions. If a SAVE function is called before (or during) the SAVEInit call, a fatal error occurs.

SAVEInit mounts the save directory (/vol/save). If the application is using USB storage to store data, SAVEInit is blocked until the USB device is available.

This function does not call FSInit. Make sure to call FSInit before calling SAVEInit.

Special Consideration Regarding Initialization

To ensure an enhanced boot time for the application, delay the call to SAVEInit for as long as possible.

Initializing the SAVE library depends heavily on the file system. Calling SaveInit may decrease the speed of important read requests, or block other processes from executing until the necessary storage device is mounted and becomes available.

Nintendo recommends starting SAVEInit after the startup screen has been displayed to the user.

Do Not Call From

Multiple threads This function is not thread-safe.

See Also

FSInit
SAVEShutdown

Revision History

2013/05/08 Automated cleanup pass.
2012/08/30 Changed the type of return value from FSStaus to SAVEStatus to clearly show that FSGetErrorCodeForViewer cannot handle an error from this function.
2012/08/30 Updated the description of the SAVE_STATUS_FATAL_ERROR error.
2012/08/21 Changed the specifications to wait for USB storage.
2012/08/21 Removed the restriction on calling FSInit immediately before SAVEInit.
2012/07/03 Added a description of internals.
2012/06/14 Revised the return values.
2012/03/29 Initial version.


CONFIDENTIAL