add savefile hack menu option from 0.9.4 branch for upgrading savefile sizes when one has been careless and used the wrong savefile size
This commit is contained in:
parent
c2bd05797c
commit
27a1f1de34
|
@ -8,6 +8,8 @@
|
|||
- [2665]
|
||||
fix nitsuja's desynch bugreports (SF 2827543)
|
||||
fix desynch caused by spu_core forgetting to save a variable
|
||||
- [2855]
|
||||
add hack for savefile size change from 0.9.4 branch (r2727)
|
||||
|
||||
0.9.2 -> 0.9.4 (r1844->r2352->r2437)
|
||||
|
||||
|
|
12
src/mc.cpp
12
src/mc.cpp
|
@ -78,6 +78,12 @@ static const int save_types[7][2] = {
|
|||
{MC_TYPE_FLASH,MC_SIZE_4MBITS}
|
||||
};
|
||||
|
||||
//forces the current
|
||||
void backup_forceManualBackupType()
|
||||
{
|
||||
MMU_new.backupDevice.forceManualBackupType();
|
||||
}
|
||||
|
||||
void backup_setManualBackupType(int type)
|
||||
{
|
||||
CommonSettings.manualBackupType = type;
|
||||
|
@ -818,3 +824,9 @@ bool BackupDevice::load_movie(std::istream* is) {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
void BackupDevice::forceManualBackupType()
|
||||
{
|
||||
addr_size = addr_size_for_old_save_size(save_types[CommonSettings.manualBackupType][1]);
|
||||
state = RUNNING;
|
||||
}
|
||||
|
|
3
src/mc.h
3
src/mc.h
|
@ -75,6 +75,8 @@ public:
|
|||
|
||||
void reset();
|
||||
void close_rom();
|
||||
|
||||
void forceManualBackupType();
|
||||
|
||||
bool save_state(std::ostream* os);
|
||||
bool load_state(std::istream* is);
|
||||
|
@ -142,6 +144,7 @@ void fw_reset_com(memory_chip_t *mc); /* reset communication with mc */
|
|||
u8 fw_transfer(memory_chip_t *mc, u8 data);
|
||||
|
||||
void backup_setManualBackupType(int type);
|
||||
void backup_forceManualBackupType();
|
||||
|
||||
#endif /*__FW_H__*/
|
||||
|
||||
|
|
|
@ -3555,6 +3555,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
case IDC_SAVETYPE5: backup_setManualBackupType(4); return 0;
|
||||
case IDC_SAVETYPE6: backup_setManualBackupType(5); return 0;
|
||||
case IDC_SAVETYPE7: backup_setManualBackupType(6); return 0;
|
||||
case IDC_SAVETYPE_FORCE: backup_forceManualBackupType(); return 0;
|
||||
|
||||
case IDM_RESET:
|
||||
ResetGame();
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define IDC_SAVETYPE4 185
|
||||
#define IDC_SAVETYPE5 186
|
||||
#define IDC_SAVETYPE6 187
|
||||
#define IDC_SAVETYPE_FORCE 188
|
||||
#define IDC_FRAMESKIPAUTO 190
|
||||
#define IDC_FRAMESKIP0 191
|
||||
#define IDC_FRAMESKIP1 192
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue