(windows) fix big fail in auto-selection of .duc import size
This commit is contained in:
parent
4a128f946c
commit
adae275e16
|
@ -627,6 +627,11 @@ void BackupDevice::close_rom()
|
|||
fpMC = NULL;
|
||||
}
|
||||
|
||||
//todo - this function is horrible. it's only needed due to our big disorganization between save types and sizes.
|
||||
//the concept of a backup memory type "enum" (not actually an enum) was added after the original .dsv format
|
||||
//the original .dsv format contains a 'type' which is kind of useless (flash vs eeprom) and then a memory size
|
||||
//the memory size also happens to exactly identify a memory type. this function performs that mapping.
|
||||
//we should fix this in a new revision of .dsv
|
||||
u8 BackupDevice::searchFileSaveType(u32 size)
|
||||
{
|
||||
for (u8 i = 1; i < MAX_SAVE_TYPES; i++)
|
||||
|
|
|
@ -130,7 +130,7 @@ BOOL CALLBACK ImportSizeSelect_Proc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
|
|||
u32 res = 0;
|
||||
|
||||
if (SendDlgItemMessage(hDlg, IDC_IMP_AUTO_CURRENT, BM_GETCHECK, 0, 0) == BST_CHECKED)
|
||||
res = MMU_new.backupDevice.info.type;
|
||||
res = MMU_new.backupDevice.searchFileSaveType(MMU_new.backupDevice.info.size);
|
||||
else
|
||||
if (SendDlgItemMessage(hDlg, IDC_IMP_AUTO_FILE, BM_GETCHECK, 0, 0) == BST_CHECKED)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue