SaveService: Move save_slot_written call and onWritten notification (#2388)

* move onWritten notification to before sidecar flush

* call save_slot_written in dataWrite() instead of memCardDataSaveWait2

* move save_slot_written to memCardDataSaveWait
This commit is contained in:
gymnast86
2026-09-04 02:10:02 -05:00
committed by GitHub
parent bc32702cb4
commit 0a4a335e4a
2 changed files with 8 additions and 6 deletions
+6 -4
View File
@@ -1452,6 +1452,12 @@ void dMenu_save_c::memCardDataSaveWait() {
mCmdState = g_mDoMemCd_control.SaveSync();
if (mCmdState != 0) {
#if TARGET_PC
if (mCmdState == 1) {
dusk::mods::svc::save_slot_written(
mSelectedFile, mSaveBuffer + mSelectedFile * QUEST_LOG_SIZE);
}
#endif
printf("save cmdState %d\n", mCmdState);
mMenuProc = PROC_MEMCARD_DATA_SAVE_WAIT2;
}
@@ -1469,10 +1475,6 @@ void dMenu_save_c::memCardDataSaveWait2() {
dComIfGs_setDataNum(mSelectedFile);
dComIfGs_setNoFile(0);
#if TARGET_PC
dusk::mods::svc::save_slot_written(mSelectedFile, mSaveBuffer + mSelectedFile * QUEST_LOG_SIZE);
#endif
if (mUseType == TYPE_WHITE_EVENT || mUseType == TYPE_BLACK_EVENT) {
headerTxtSet(0x530); // Saved.
mWarning->closeInit();