- add import Action Replay .dss save file;
This commit is contained in:
mtabachenko 2013-12-04 14:43:03 +00:00
parent 4c8e70acd9
commit 285c4d567f
2 changed files with 6 additions and 4 deletions

View File

@ -982,7 +982,8 @@ u32 BackupDevice::importDataSize(const char *filename)
u32 res = 0; u32 res = 0;
if (strlen(filename) < 4) return 0; if (strlen(filename) < 4) return 0;
if (memcmp(filename + strlen(filename) - 4, ".duc", 4) == 0) if ((memcmp(filename + strlen(filename) - 4, ".duc", 4) == 0) ||
(memcmp(filename + strlen(filename) - 4, ".dss", 4) == 0))
{ {
res = get_save_duc_size(filename); res = get_save_duc_size(filename);
if (res == 0xFFFFFFFF) return 0; if (res == 0xFFFFFFFF) return 0;
@ -1003,7 +1004,8 @@ bool BackupDevice::importData(const char *filename, u32 force_size)
bool res = false; bool res = false;
if (strlen(filename) < 4) return res; if (strlen(filename) < 4) return res;
if (memcmp(filename + strlen(filename) - 4, ".duc", 4) == 0) if ((memcmp(filename + strlen(filename) - 4, ".duc", 4) == 0) ||
(memcmp(filename + strlen(filename) - 4, ".dss", 4) == 0))
res = import_duc(filename, force_size); res = import_duc(filename, force_size);
else else
if (import_no_gba(filename, force_size)) if (import_no_gba(filename, force_size))

View File

@ -169,11 +169,11 @@ bool importSave(HWND hwnd, HINSTANCE hAppInst)
ZeroMemory(&ofn, sizeof(ofn)); ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn); ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwnd; ofn.hwndOwner = hwnd;
ofn.lpstrFilter = "All supported types\0*.duc;*.sav\0Action Replay DS Save (*.duc)\0*.duc\0Raw/No$GBA Save format (*.sav)\0*.sav\0\0"; ofn.lpstrFilter = "All supported types\0*.sav;*.duc;*.dss\0Raw/No$GBA Save format (*.sav)\0*.sav\0Action Replay DS Save (*.duc,*.dss)\0*.duc;*.dss\0\0";
ofn.nFilterIndex = 1; ofn.nFilterIndex = 1;
ofn.lpstrFile = ImportSavFName; ofn.lpstrFile = ImportSavFName;
ofn.nMaxFile = MAX_PATH; ofn.nMaxFile = MAX_PATH;
ofn.lpstrDefExt = "duc"; ofn.lpstrDefExt = "sav";
ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; ofn.Flags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST;
char buffer[MAX_PATH] = {0}; char buffer[MAX_PATH] = {0};