2012-12-27 00:22:44 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Copyright (C) 2012 FIX94
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef _NAND_SAVE_HPP_
|
|
|
|
#define _NAND_SAVE_HPP_
|
|
|
|
|
|
|
|
#include <ogcsys.h>
|
|
|
|
|
|
|
|
typedef struct _ios_settings_t
|
|
|
|
{
|
|
|
|
u8 cios;
|
|
|
|
bool use_cios;
|
2013-01-01 18:42:46 +01:00
|
|
|
} ATTRIBUTE_PACKED ios_settings_t;
|
2012-12-27 00:22:44 +01:00
|
|
|
|
|
|
|
class NandSave
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NandSave();
|
|
|
|
bool CheckSave();
|
2013-02-14 22:30:48 +01:00
|
|
|
void LoadSettings();
|
2013-04-08 23:45:13 +02:00
|
|
|
void SaveIOS();
|
2013-02-14 22:30:48 +01:00
|
|
|
void SavePort(u8 port);
|
2012-12-27 00:22:44 +01:00
|
|
|
private:
|
2013-02-14 22:30:48 +01:00
|
|
|
void WriteFile(const char *file_name, u8 *content, u32 size);
|
2012-12-27 00:22:44 +01:00
|
|
|
s32 fd;
|
|
|
|
s32 ret;
|
|
|
|
bool loaded;
|
|
|
|
char ISFS_Path[ISFS_MAXPATH];
|
2012-12-27 02:08:16 +01:00
|
|
|
ios_settings_t ios_settings;
|
2012-12-27 00:22:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
extern NandSave InternalSave;
|
2013-04-08 23:45:13 +02:00
|
|
|
extern bool cur_load;
|
|
|
|
extern u8 cur_ios;
|
2012-12-27 00:22:44 +01:00
|
|
|
|
|
|
|
#endif
|