mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-11 18:50:55 +00:00
cellSaveData: get confirmation if not CELL_SAVEDATA_OPTION_NOCONFIRM
This commit is contained in:
parent
ff0089bc6f
commit
0b78404337
1 changed files with 30 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "Emu/Cell/lv2/sys_sync.h"
|
#include "Emu/Cell/lv2/sys_sync.h"
|
||||||
#include "Emu/Cell/lv2/sys_process.h"
|
#include "Emu/Cell/lv2/sys_process.h"
|
||||||
|
@ -916,6 +916,35 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fixedSet->option != CELL_SAVEDATA_OPTION_NOCONFIRM)
|
||||||
|
{
|
||||||
|
std::string message;
|
||||||
|
|
||||||
|
if (selected == -1)
|
||||||
|
{
|
||||||
|
message = "Create new Save Data?";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Get information from the selected entry
|
||||||
|
SaveDataEntry entry = save_entries[selected];
|
||||||
|
message = get_confirmation_message(operation) + "\n\n" + entry.title + "\n" + entry.subtitle + "\n" + entry.details;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get user confirmation
|
||||||
|
error_code res = open_msg_dialog(true, CELL_MSGDIALOG_TYPE_SE_TYPE_NORMAL | CELL_MSGDIALOG_TYPE_BUTTON_TYPE_YESNO, vm::make_str(message));
|
||||||
|
|
||||||
|
if (res != CELL_OK)
|
||||||
|
{
|
||||||
|
return CELL_SAVEDATA_ERROR_INTERNAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_last_user_response != CELL_MSGDIALOG_BUTTON_YES)
|
||||||
|
{
|
||||||
|
return CELL_CANCEL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (selected == -1)
|
if (selected == -1)
|
||||||
{
|
{
|
||||||
save_entry.dirName = fixedSet->dirName.get_ptr();
|
save_entry.dirName = fixedSet->dirName.get_ptr();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue