Extra Handling of result value of funcStat CB.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "Emu/Cell/PPUModule.h"
|
#include "Emu/Cell/PPUModule.h"
|
||||||
#include "Emu/Cell/Modules/cellSysutil.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{};
|
fs::stat_t dir_info{};
|
||||||
if (!fs::stat(dir_path, 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
|
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);
|
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)
|
if (result->result < CELL_SAVEDATA_CBRESULT_OK_NEXT)
|
||||||
{
|
{
|
||||||
return CELL_SAVEDATA_ERROR_CBRESULT;
|
return CELL_SAVEDATA_ERROR_CBRESULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip and return without error
|
||||||
|
if (result->result == CELL_SAVEDATA_CBRESULT_OK_LAST)
|
||||||
|
{
|
||||||
|
return CELL_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statSet->setParam)
|
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;
|
return CELL_SAVEDATA_ERROR_PARAM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result->result != CELL_SAVEDATA_CBRESULT_OK_NEXT)
|
|
||||||
{
|
|
||||||
funcFile = vm::null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user