2012-12-10 13:08:54 +01:00
// Copyright (c) 2012- PPSSPP Project.
// 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, version 2.0 or later versions.
// 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 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
# pragma once
2022-10-09 11:25:39 -07:00
# include <memory>
# include <mutex>
2020-05-23 23:11:03 -07:00
# include <set>
2022-10-09 11:25:39 -07:00
# include <unordered_map>
2013-12-29 23:44:35 +01:00
# include "Common/CommonTypes.h"
2022-10-09 11:25:39 -07:00
# include "Core/ELF/ParamSFO.h"
2013-12-29 23:44:35 +01:00
# include "Core/MemMap.h"
2013-05-30 23:32:13 -07:00
# include "Core/HLE/sceRtc.h"
2013-06-10 16:52:26 +08:00
# include "Core/Dialog/PSPDialog.h"
2013-07-27 15:30:18 -07:00
2013-06-02 13:26:39 +10:00
# undef st_ctime
# undef st_atime
# undef st_mtime
2012-12-10 13:08:54 +01:00
2014-03-15 10:48:30 -07:00
class PPGeImage ;
2013-12-29 23:28:31 +01:00
struct PSPFileInfo ;
2014-03-15 10:48:30 -07:00
typedef u32_le SceSize_le ;
2013-12-29 23:28:31 +01:00
2012-12-10 13:08:54 +01:00
enum SceUtilitySavedataType
{
2013-03-17 17:47:37 -07:00
SCE_UTILITY_SAVEDATA_TYPE_AUTOLOAD = 0 ,
SCE_UTILITY_SAVEDATA_TYPE_AUTOSAVE = 1 ,
SCE_UTILITY_SAVEDATA_TYPE_LOAD = 2 ,
SCE_UTILITY_SAVEDATA_TYPE_SAVE = 3 ,
SCE_UTILITY_SAVEDATA_TYPE_LISTLOAD = 4 ,
SCE_UTILITY_SAVEDATA_TYPE_LISTSAVE = 5 ,
2020-10-01 00:39:14 +08:00
SCE_UTILITY_SAVEDATA_TYPE_LISTDELETE = 6 ,
SCE_UTILITY_SAVEDATA_TYPE_LISTALLDELETE = 7 , // When run on a PSP, displays a list of all saves on the PSP. Weird. (Not really, it's to let you free up space)
2013-03-17 17:47:37 -07:00
SCE_UTILITY_SAVEDATA_TYPE_SIZES = 8 ,
2013-04-21 14:18:12 -07:00
SCE_UTILITY_SAVEDATA_TYPE_AUTODELETE = 9 ,
2020-10-01 00:39:14 +08:00
SCE_UTILITY_SAVEDATA_TYPE_DELETE = 10 ,
2013-03-17 17:47:37 -07:00
SCE_UTILITY_SAVEDATA_TYPE_LIST = 11 ,
SCE_UTILITY_SAVEDATA_TYPE_FILES = 12 ,
SCE_UTILITY_SAVEDATA_TYPE_MAKEDATASECURE = 13 ,
2013-04-21 14:18:12 -07:00
SCE_UTILITY_SAVEDATA_TYPE_MAKEDATA = 14 ,
2013-03-17 17:47:37 -07:00
SCE_UTILITY_SAVEDATA_TYPE_READDATASECURE = 15 ,
2013-04-21 14:18:12 -07:00
SCE_UTILITY_SAVEDATA_TYPE_READDATA = 16 ,
2013-03-17 17:47:37 -07:00
SCE_UTILITY_SAVEDATA_TYPE_WRITEDATASECURE = 17 ,
2013-04-21 14:18:12 -07:00
SCE_UTILITY_SAVEDATA_TYPE_WRITEDATA = 18 ,
SCE_UTILITY_SAVEDATA_TYPE_ERASESECURE = 19 ,
SCE_UTILITY_SAVEDATA_TYPE_ERASE = 20 ,
2013-03-17 17:47:37 -07:00
SCE_UTILITY_SAVEDATA_TYPE_DELETEDATA = 21 ,
SCE_UTILITY_SAVEDATA_TYPE_GETSIZE = 22 ,
} ;
2012-12-10 13:08:54 +01:00
2014-03-15 17:20:34 -07:00
static const char * const utilitySavedataTypeNames [ ] = {
" AUTOLOAD " ,
" AUTOSAVE " ,
" LOAD " ,
" SAVE " ,
" LISTLOAD " ,
" LISTSAVE " ,
" LISTDELETE " ,
2020-10-05 00:00:28 +08:00
" LISTALLDELETE " ,
2014-03-15 17:20:34 -07:00
" SIZES " ,
" AUTODELETE " ,
2020-10-05 00:00:28 +08:00
" DELETE " ,
2014-03-15 17:20:34 -07:00
" LIST " ,
" FILES " ,
" MAKEDATASECURE " ,
" MAKEDATA " ,
" READDATASECURE " ,
" READDATA " ,
" WRITEDATASECURE " ,
" WRITEDATA " ,
" ERASESECURE " ,
" ERASE " ,
" DELETEDATA " ,
" GETSIZE " ,
} ;
2013-05-20 19:03:58 +08:00
enum SceUtilitySavedataFocus
{
SCE_UTILITY_SAVEDATA_FOCUS_NAME = 0 , // specified by saveName[]
2013-06-10 13:48:35 +08:00
SCE_UTILITY_SAVEDATA_FOCUS_FIRSTLIST = 1 , // first listed (on screen or of all?)
SCE_UTILITY_SAVEDATA_FOCUS_LASTLIST = 2 , // last listed (on screen or of all?)
2013-05-20 19:03:58 +08:00
SCE_UTILITY_SAVEDATA_FOCUS_LATEST = 3 , // latest by modification date (first if none)
2013-06-10 13:48:35 +08:00
SCE_UTILITY_SAVEDATA_FOCUS_OLDEST = 4 , // oldest by modification date (first if none)
2013-05-20 19:03:58 +08:00
SCE_UTILITY_SAVEDATA_FOCUS_FIRSTDATA = 5 , // first non-empty (first if none)
SCE_UTILITY_SAVEDATA_FOCUS_LASTDATA = 6 , // last non-empty (first if none)
SCE_UTILITY_SAVEDATA_FOCUS_FIRSTEMPTY = 7 , // first empty (what if no empty?)
SCE_UTILITY_SAVEDATA_FOCUS_LASTEMPTY = 8 , // last empty (what if no empty?)
} ;
2013-07-27 15:30:18 -07:00
# if COMMON_LITTLE_ENDIAN
typedef SceUtilitySavedataType SceUtilitySavedataType_le ;
typedef SceUtilitySavedataFocus SceUtilitySavedataFocus_le ;
# else
2013-07-28 20:28:32 -07:00
typedef swap_struct_t < SceUtilitySavedataType , swap_32_t < SceUtilitySavedataType > > SceUtilitySavedataType_le ;
typedef swap_struct_t < SceUtilitySavedataFocus , swap_32_t < SceUtilitySavedataFocus > > SceUtilitySavedataFocus_le ;
2013-07-27 15:30:18 -07:00
# endif
2013-06-23 11:06:54 -07:00
typedef char SceUtilitySavedataSaveName [ 20 ] ;
2012-12-10 13:08:54 +01:00
// title, savedataTitle, detail: parts of the unencrypted SFO
// data, it contains what the VSH and standard load screen shows
struct PspUtilitySavedataSFOParam
{
char title [ 0x80 ] ;
char savedataTitle [ 0x80 ] ;
char detail [ 0x400 ] ;
unsigned char parentalLevel ;
unsigned char unknown [ 3 ] ;
} ;
struct PspUtilitySavedataFileData {
2013-06-22 22:44:00 -07:00
PSPPointer < u8 > buf ;
2013-07-27 15:30:18 -07:00
SceSize_le bufSize ; // Size of the buffer pointed to by buf
SceSize_le size ; // Actual file size to write / was read
s32_le unknown ;
2012-12-10 13:08:54 +01:00
} ;
2013-03-17 17:47:37 -07:00
struct PspUtilitySavedataSizeEntry {
2013-07-27 15:30:18 -07:00
u64_le size ;
2013-03-17 17:47:37 -07:00
char name [ 16 ] ;
} ;
struct PspUtilitySavedataSizeInfo {
2013-07-27 15:30:18 -07:00
s32_le numSecureEntries ;
s32_le numNormalEntries ;
2013-06-23 13:56:18 -07:00
PSPPointer < PspUtilitySavedataSizeEntry > secureEntries ;
PSPPointer < PspUtilitySavedataSizeEntry > normalEntries ;
2013-07-27 15:30:18 -07:00
s32_le sectorSize ;
s32_le freeSectors ;
s32_le freeKB ;
2013-03-17 17:47:37 -07:00
char freeString [ 8 ] ;
2013-07-27 15:30:18 -07:00
s32_le neededKB ;
2013-03-17 17:47:37 -07:00
char neededString [ 8 ] ;
2013-07-27 15:30:18 -07:00
s32_le overwriteKB ;
2013-03-17 17:47:37 -07:00
char overwriteString [ 8 ] ;
} ;
2013-06-23 12:41:37 -07:00
struct SceUtilitySavedataIdListEntry
{
2013-07-27 15:30:18 -07:00
s32_le st_mode ;
2013-06-23 12:41:37 -07:00
ScePspDateTime st_ctime ;
ScePspDateTime st_atime ;
ScePspDateTime st_mtime ;
SceUtilitySavedataSaveName name ;
} ;
struct SceUtilitySavedataIdListInfo
{
2013-07-27 15:30:18 -07:00
s32_le maxCount ;
s32_le resultCount ;
2013-06-23 12:41:37 -07:00
PSPPointer < SceUtilitySavedataIdListEntry > entries ;
} ;
2013-05-30 23:32:13 -07:00
struct SceUtilitySavedataFileListEntry
{
2013-07-27 15:30:18 -07:00
s32_le st_mode ;
2014-01-28 00:24:56 +04:00
u32_le st_unk0 ;
2013-07-27 15:30:18 -07:00
u64_le st_size ;
2013-05-30 23:32:13 -07:00
ScePspDateTime st_ctime ;
ScePspDateTime st_atime ;
ScePspDateTime st_mtime ;
char name [ 16 ] ;
} ;
struct SceUtilitySavedataFileListInfo
{
2013-07-27 15:30:18 -07:00
u32_le maxSecureEntries ;
u32_le maxNormalEntries ;
u32_le maxSystemEntries ;
u32_le resultNumSecureEntries ;
u32_le resultNumNormalEntries ;
u32_le resultNumSystemEntries ;
2013-05-30 23:32:13 -07:00
PSPPointer < SceUtilitySavedataFileListEntry > secureEntries ;
PSPPointer < SceUtilitySavedataFileListEntry > normalEntries ;
PSPPointer < SceUtilitySavedataFileListEntry > systemEntries ;
} ;
2013-06-23 12:41:37 -07:00
struct SceUtilitySavedataMsFreeInfo
{
2013-07-27 15:30:18 -07:00
s32_le clusterSize ;
s32_le freeClusters ;
s32_le freeSpaceKB ;
2013-06-23 11:06:54 -07:00
char freeSpaceStr [ 8 ] ;
2013-06-23 12:41:37 -07:00
} ;
2013-06-23 11:06:54 -07:00
2013-06-23 12:41:37 -07:00
struct SceUtilitySavedataUsedDataInfo
{
2013-07-27 15:30:18 -07:00
s32_le usedClusters ;
s32_le usedSpaceKB ;
2013-06-23 11:06:54 -07:00
char usedSpaceStr [ 8 ] ;
2013-07-27 15:30:18 -07:00
s32_le usedSpace32KB ;
2013-06-23 11:06:54 -07:00
char usedSpace32Str [ 8 ] ;
2013-06-23 12:41:37 -07:00
} ;
2013-06-23 11:06:54 -07:00
2013-06-23 12:41:37 -07:00
struct SceUtilitySavedataMsDataInfo
{
2013-06-23 11:06:54 -07:00
char gameName [ 13 ] ;
char pad [ 3 ] ;
SceUtilitySavedataSaveName saveName ;
SceUtilitySavedataUsedDataInfo info ;
2013-06-23 12:41:37 -07:00
} ;
2013-06-22 22:49:39 -07:00
2012-12-10 13:08:54 +01:00
// Structure to hold the parameters for the sceUtilitySavedataInitStart function.
struct SceUtilitySavedataParam
{
2013-06-10 16:52:26 +08:00
pspUtilityDialogCommon common ;
2012-12-10 13:08:54 +01:00
2013-07-27 15:30:18 -07:00
SceUtilitySavedataType_le mode ; // 0 to load, 1 to save
s32_le bind ;
2012-12-10 13:08:54 +01:00
2013-07-27 15:30:18 -07:00
s32_le overwriteMode ; // use 0x10 ?
2012-12-10 13:08:54 +01:00
/** gameName: name used from the game for saves, equal for all saves */
char gameName [ 13 ] ;
char unused [ 3 ] ;
/** saveName: name of the particular save, normally a number */
2013-06-22 22:49:39 -07:00
SceUtilitySavedataSaveName saveName ;
PSPPointer < SceUtilitySavedataSaveName > saveNameList ;
2012-12-10 13:08:54 +01:00
/** fileName: name of the data file of the game for example DATA.BIN */
char fileName [ 13 ] ;
char unused2 [ 3 ] ;
/** pointer to a buffer that will contain data file unencrypted data */
2013-06-22 22:49:39 -07:00
PSPPointer < u8 > dataBuf ;
2012-12-10 13:08:54 +01:00
/** size of allocated space to dataBuf */
2013-07-27 15:30:18 -07:00
SceSize_le dataBufSize ;
SceSize_le dataSize ; // Size of the actual save data
2012-12-10 13:08:54 +01:00
PspUtilitySavedataSFOParam sfoParam ;
PspUtilitySavedataFileData icon0FileData ;
PspUtilitySavedataFileData icon1FileData ;
PspUtilitySavedataFileData pic1FileData ;
PspUtilitySavedataFileData snd0FileData ;
2013-06-22 22:40:48 -07:00
PSPPointer < PspUtilitySavedataFileData > newData ;
2013-07-27 15:30:18 -07:00
SceUtilitySavedataFocus_le focus ;
s32_le abortStatus ;
2012-12-11 03:09:52 +01:00
// Function SCE_UTILITY_SAVEDATA_TYPE_SIZES
2013-06-23 11:06:54 -07:00
PSPPointer < SceUtilitySavedataMsFreeInfo > msFree ;
PSPPointer < SceUtilitySavedataMsDataInfo > msData ;
PSPPointer < SceUtilitySavedataUsedDataInfo > utilityData ;
2012-12-11 03:09:52 +01:00
2013-01-29 00:11:02 +01:00
u8 key [ 16 ] ;
2012-12-11 03:09:52 +01:00
2018-06-24 15:30:33 -07:00
u32_le secureVersion ;
2013-07-27 15:30:18 -07:00
s32_le multiStatus ;
2012-12-11 03:09:52 +01:00
// Function 11 LIST
2013-06-23 12:41:37 -07:00
PSPPointer < SceUtilitySavedataIdListInfo > idList ;
2012-12-11 03:09:52 +01:00
// Function 12 FILES
2013-06-02 15:17:02 -07:00
PSPPointer < SceUtilitySavedataFileListInfo > fileList ;
2012-12-11 03:09:52 +01:00
// Function 22 GETSIZES
2013-06-23 13:56:18 -07:00
PSPPointer < PspUtilitySavedataSizeInfo > sizeInfo ;
2012-12-10 13:08:54 +01:00
} ;
2012-12-19 21:23:52 +01:00
// Non native, this one we can reorganize as we like
2012-12-10 13:08:54 +01:00
struct SaveFileInfo
{
2021-02-15 10:29:34 -08:00
s64 size = 0 ;
2012-12-16 12:51:02 +01:00
std : : string saveName ;
2020-10-05 00:00:28 +08:00
std : : string saveDir ;
2021-02-15 10:29:34 -08:00
int idx = 0 ;
2012-12-13 22:06:45 +01:00
2021-02-15 10:29:34 -08:00
char title [ 128 ] { } ;
char saveTitle [ 128 ] { } ;
char saveDetail [ 1024 ] { } ;
2012-12-14 23:08:56 +01:00
2021-02-15 10:29:34 -08:00
bool broken = false ;
2020-10-01 15:41:27 +08:00
2021-02-15 10:29:34 -08:00
tm modif_time { } ;
2012-12-14 23:08:56 +01:00
2021-02-15 10:29:34 -08:00
PPGeImage * texture = nullptr ;
2013-02-04 01:39:52 -08:00
2013-12-29 23:44:35 +01:00
void DoState ( PointerWrap & p ) ;
2012-12-10 13:08:54 +01:00
} ;
2013-12-29 23:44:35 +01:00
2018-06-30 12:17:52 -07:00
struct SaveSFOFileListEntry {
char filename [ 13 ] ;
u8 hash [ 16 ] ;
u8 pad [ 3 ] ;
} ;
2012-12-10 13:08:54 +01:00
class SavedataParam
{
public :
2013-01-02 21:11:24 +01:00
SavedataParam ( ) ;
2012-12-10 13:08:54 +01:00
static void Init ( ) ;
2014-01-24 01:21:13 -08:00
std : : string GetSaveFilePath ( const SceUtilitySavedataParam * param , int saveId = - 1 ) const ;
std : : string GetSaveFilePath ( const SceUtilitySavedataParam * param , const std : : string & saveDir ) const ;
std : : string GetSaveDirName ( const SceUtilitySavedataParam * param , int saveId = - 1 ) const ;
std : : string GetSaveDir ( const SceUtilitySavedataParam * param , int saveId = - 1 ) const ;
std : : string GetSaveDir ( const SceUtilitySavedataParam * param , const std : : string & saveDirName ) const ;
2012-12-10 13:08:54 +01:00
bool Delete ( SceUtilitySavedataParam * param , int saveId = - 1 ) ;
2013-11-02 19:48:25 +08:00
int DeleteData ( SceUtilitySavedataParam * param ) ;
2018-06-24 13:28:57 -07:00
int Save ( SceUtilitySavedataParam * param , const std : : string & saveDirName , bool secureMode = true ) ;
int Load ( SceUtilitySavedataParam * param , const std : : string & saveDirName , int saveId = - 1 , bool secureMode = true ) ;
2013-06-23 11:14:13 -07:00
int GetSizes ( SceUtilitySavedataParam * param ) ;
2012-12-11 03:09:52 +01:00
bool GetList ( SceUtilitySavedataParam * param ) ;
2022-01-26 00:31:30 -08:00
int GetFilesList ( SceUtilitySavedataParam * param , u32 requestAddr ) ;
2013-01-10 10:01:48 +01:00
bool GetSize ( SceUtilitySavedataParam * param ) ;
2022-12-10 21:02:44 -08:00
int GetSaveCryptMode ( const SceUtilitySavedataParam * param , const std : : string & saveDirName ) ;
2013-10-28 00:07:32 +08:00
bool IsInSaveDataList ( std : : string saveName , int count ) ;
2012-12-11 03:09:52 +01:00
2014-01-24 01:21:13 -08:00
std : : string GetGameName ( const SceUtilitySavedataParam * param ) const ;
std : : string GetSaveName ( const SceUtilitySavedataParam * param ) const ;
std : : string GetFileName ( const SceUtilitySavedataParam * param ) const ;
2014-03-08 23:03:32 -08:00
std : : string GetKey ( const SceUtilitySavedataParam * param ) const ;
2014-07-06 19:27:51 -07:00
bool HasKey ( const SceUtilitySavedataParam * param ) const ;
2012-12-10 13:08:54 +01:00
2017-10-14 21:52:23 -07:00
static std : : string GetSpaceText ( u64 size , bool roundUp ) ;
2012-12-19 16:57:22 +01:00
2022-10-09 10:36:19 -07:00
void SetIgnoreTextures ( bool state ) {
ignoreTextures_ = state ;
}
2012-12-24 18:37:28 -08:00
int SetPspParam ( SceUtilitySavedataParam * param ) ;
2014-01-24 01:21:13 -08:00
SceUtilitySavedataParam * GetPspParam ( ) ;
const SceUtilitySavedataParam * GetPspParam ( ) const ;
2012-12-10 13:08:54 +01:00
int GetFilenameCount ( ) ;
const SaveFileInfo & GetFileInfo ( int idx ) ;
2014-01-24 01:21:13 -08:00
std : : string GetFilename ( int idx ) const ;
2020-10-05 00:00:28 +08:00
std : : string GetSaveDir ( int idx ) const ;
2012-12-10 13:08:54 +01:00
int GetSelectedSave ( ) ;
void SetSelectedSave ( int idx ) ;
2013-05-20 19:03:58 +08:00
int GetFirstListSave ( ) ;
int GetLastListSave ( ) ;
2013-05-19 21:11:54 +08:00
int GetLatestSave ( ) ;
2013-05-20 19:03:58 +08:00
int GetOldestSave ( ) ;
int GetFirstDataSave ( ) ;
int GetLastDataSave ( ) ;
int GetFirstEmptySave ( ) ;
int GetLastEmptySave ( ) ;
2022-12-10 21:02:44 -08:00
int GetSaveNameIndex ( const SceUtilitySavedataParam * param ) ;
2013-05-19 21:11:54 +08:00
2022-12-10 21:02:44 -08:00
bool WouldHaveMultiSaveName ( const SceUtilitySavedataParam * param ) ;
2020-09-15 21:48:55 +08:00
2022-10-09 11:25:39 -07:00
void ClearCaches ( ) ;
2012-12-28 13:36:37 -08:00
void DoState ( PointerWrap & p ) ;
2012-12-10 13:08:54 +01:00
private :
2012-12-13 22:06:45 +01:00
void Clear ( ) ;
2020-10-05 00:00:28 +08:00
void SetFileInfo ( int idx , PSPFileInfo & info , std : : string saveName , std : : string saveDir = " " ) ;
void SetFileInfo ( SaveFileInfo & saveInfo , PSPFileInfo & info , std : : string saveName , std : : string saveDir = " " ) ;
2017-12-02 08:17:50 -08:00
void ClearFileInfo ( SaveFileInfo & saveInfo , const std : : string & saveName ) ;
2020-12-12 01:12:04 +08:00
PSPFileInfo GetSaveInfo ( std : : string saveDir ) ;
2012-12-13 22:06:45 +01:00
2018-06-24 13:28:57 -07:00
int LoadSaveData ( SceUtilitySavedataParam * param , const std : : string & saveDirName , const std : : string & dirPath , bool secureMode ) ;
2021-04-03 18:28:22 -07:00
u32 LoadCryptedSave ( SceUtilitySavedataParam * param , u8 * data , const u8 * saveData , int & saveSize , int prevCryptMode , const u8 * expectedHash , bool & saveDone ) ;
u32 LoadNotCryptedSave ( SceUtilitySavedataParam * param , u8 * data , u8 * saveData , int & saveSize ) ;
2021-09-11 19:53:19 +02:00
bool LoadSFO ( SceUtilitySavedataParam * param , const std : : string & dirPath ) ;
2014-12-24 21:42:41 -05:00
void LoadFile ( const std : : string & dirPath , const std : : string & filename , PspUtilitySavedataFileData * fileData ) ;
2013-11-03 23:10:05 +08:00
2018-06-30 12:17:52 -07:00
int DecryptSave ( unsigned int mode , unsigned char * data , int * dataLen , int * alignedLen , unsigned char * cryptkey , const u8 * expectedHash ) ;
2013-01-29 00:11:02 +01:00
int EncryptData ( unsigned int mode , unsigned char * data , int * dataLen , int * alignedLen , unsigned char * hash , unsigned char * cryptkey ) ;
int UpdateHash ( u8 * sfoData , int sfoSize , int sfoDataParamsOffset , int encryptmode ) ;
int BuildHash ( unsigned char * output , unsigned char * data , unsigned int len , unsigned int alignedLen , int mode , unsigned char * cryptkey ) ;
2014-07-06 19:27:51 -07:00
int DetermineCryptMode ( const SceUtilitySavedataParam * param ) const ;
2013-01-29 00:11:02 +01:00
2018-06-30 12:17:52 -07:00
std : : vector < SaveSFOFileListEntry > GetSFOEntries ( const std : : string & dirPath ) ;
std : : set < std : : string > GetSecureFileNames ( const std : : string & dirPath ) ;
bool GetExpectedHash ( const std : : string & dirPath , const std : : string & filename , u8 hash [ 16 ] ) ;
2013-11-12 11:21:26 +08:00
2022-10-09 11:25:39 -07:00
std : : shared_ptr < ParamSFOData > LoadCachedSFO ( const std : : string & path , bool orCreate = false ) ;
2022-08-18 15:20:16 +02:00
SceUtilitySavedataParam * pspParam = nullptr ;
int selectedSave = 0 ;
SaveFileInfo * saveDataList = nullptr ;
SaveFileInfo * noSaveIcon = nullptr ;
int saveDataListCount = 0 ;
int saveNameListDataCount = 0 ;
2022-10-09 10:36:19 -07:00
bool ignoreTextures_ = false ;
2022-10-09 11:25:39 -07:00
// Cleared before returning to PSP, no need to save state.
std : : mutex cacheLock_ ;
std : : unordered_map < std : : string , std : : shared_ptr < ParamSFOData > > sfoCache_ ;
2012-12-10 13:08:54 +01:00
} ;