mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 00:40:11 +00:00
Merge pull request #740 from tambry/ErrorDialogFix
Improve content errors and fix access violation
This commit is contained in:
commit
72f1206585
@ -421,9 +421,15 @@ int cellGameGetLocalWebContentPath()
|
||||
int cellGameContentErrorDialog(s32 type, s32 errNeedSizeKB, u32 dirName_addr)
|
||||
{
|
||||
cellGame->Warning("cellGameContentErrorDialog(type=%d, errNeedSizeKB=%d, dirName_addr=0x%x)", type, errNeedSizeKB, dirName_addr);
|
||||
|
||||
char* dirName = (char*)Memory.VirtualToRealAddr(dirName_addr);
|
||||
std::string errorName;
|
||||
std::string errorMsg;
|
||||
char* dirName;
|
||||
|
||||
if (type == CELL_GAME_ERRDIALOG_NOSPACE || CELL_GAME_ERRDIALOG_NOSPACE_EXIT)
|
||||
{
|
||||
char* dirName = (char*)Memory.VirtualToRealAddr(dirName_addr);
|
||||
}
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case CELL_GAME_ERRDIALOG_BROKEN_GAMEDATA: errorName = "Game data is corrupted (can be continued)."; break;
|
||||
@ -435,9 +441,17 @@ int cellGameContentErrorDialog(s32 type, s32 errNeedSizeKB, u32 dirName_addr)
|
||||
default: return CELL_GAME_ERROR_PARAM;
|
||||
}
|
||||
|
||||
std::string errorMsg = fmt::Format("%s\nSpace needed: %d KB\nDirectory name: %s",
|
||||
errorName.c_str(), errNeedSizeKB, dirName);
|
||||
if (type == CELL_GAME_ERRDIALOG_NOSPACE || CELL_GAME_ERRDIALOG_NOSPACE_EXIT)
|
||||
{
|
||||
errorMsg = fmt::Format("ERROR: %s\nSpace needed: %d KB\nDirectory name: %s", errorName.c_str(), errNeedSizeKB, dirName);
|
||||
}
|
||||
else
|
||||
{
|
||||
errorMsg = fmt::Format("ERROR: %s", errorName.c_str());
|
||||
}
|
||||
|
||||
rMessageBox(errorMsg, "Error", rICON_ERROR | rOK);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user