mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
Extra Handling of result value of funcStat CB.
This commit is contained in:
parent
92be67b402
commit
5207b00973
1 changed files with 15 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "Emu/Cell/Modules/cellSysutil.h"
|
||||
|
@ -479,7 +479,7 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
|
|||
fs::stat_t dir_info{};
|
||||
if (!fs::stat(dir_path, dir_info))
|
||||
{
|
||||
// error
|
||||
// funcStat is called even if the directory doesn't exist.
|
||||
}
|
||||
|
||||
statGet->hddFreeSizeKB = 40 * 1024 * 1024 - 1; // Read explanation in cellHddGameCheck
|
||||
|
@ -576,10 +576,23 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
|
|||
{
|
||||
cellSaveData.warning("savedata_op(): funcStat returned result=%d.", result->result);
|
||||
|
||||
// Skip and error
|
||||
if (result->result >= CELL_SAVEDATA_CBRESULT_OK_LAST_NOCONFIRM || result->result < CELL_SAVEDATA_CBRESULT_ERR_INVALID)
|
||||
{
|
||||
// ****** sysutil savedata parameter error : 22 ******
|
||||
return CELL_SAVEDATA_ERROR_PARAM;
|
||||
}
|
||||
|
||||
if (result->result < CELL_SAVEDATA_CBRESULT_OK_NEXT)
|
||||
{
|
||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||
}
|
||||
|
||||
// Skip and return without error
|
||||
if (result->result == CELL_SAVEDATA_CBRESULT_OK_LAST)
|
||||
{
|
||||
return CELL_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if (statSet->setParam)
|
||||
|
@ -656,11 +669,6 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
|
|||
return CELL_SAVEDATA_ERROR_PARAM;
|
||||
}
|
||||
}
|
||||
|
||||
if (result->result != CELL_SAVEDATA_CBRESULT_OK_NEXT)
|
||||
{
|
||||
funcFile = vm::null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue