Windows Port: Fix compiling due to BackupDevice::_info name change. (Regression from commit 0907207.)

This commit is contained in:
rogerman 2017-11-13 14:43:41 -08:00
parent 0907207222
commit 63a5cb90ae
3 changed files with 13 additions and 5 deletions

View File

@ -32,6 +32,8 @@ u32 fileSaveType = 0xFF;
BOOL CALLBACK ImportSizeSelect_Proc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
BackupDeviceFileInfo fileInfo = MMU_new.backupDevice.GetFileInfo();
switch (msg)
{
case WM_INITDIALOG:
@ -62,7 +64,7 @@ BOOL CALLBACK ImportSizeSelect_Proc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
EnableWindow(GetDlgItem(hDlg, IDC_IMP_AUTO_ADVANSCENE), false);
{
u8 type = MMU_new.backupDevice.searchFileSaveType(MMU_new.backupDevice.info.size);
u8 type = MMU_new.backupDevice.searchFileSaveType(fileInfo.size);
if (type == 0xFF)
SetWindowText(GetDlgItem(hDlg, IDC_IMP_INFO_CURRENT), "NA");
else
@ -75,7 +77,7 @@ BOOL CALLBACK ImportSizeSelect_Proc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
{
SendDlgItemMessage(hDlg, IDC_IMP_MANUAL_SIZE, CB_ADDSTRING, 0, (LPARAM)save_types[i].descr);
}
SendDlgItemMessage(hDlg, IDC_IMP_MANUAL_SIZE, CB_SETCURSEL, MMU_new.backupDevice.info.type, 0);
SendDlgItemMessage(hDlg, IDC_IMP_MANUAL_SIZE, CB_SETCURSEL, fileInfo.type, 0);
fileSaveSize = MMU_new.backupDevice.importDataSize(ImportSavFName);
@ -130,7 +132,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.searchFileSaveType(MMU_new.backupDevice.info.size);
res = MMU_new.backupDevice.searchFileSaveType(fileInfo.size);
else
if (SendDlgItemMessage(hDlg, IDC_IMP_AUTO_FILE, BM_GETCHECK, 0, 0) == BST_CHECKED)
{

View File

@ -1702,6 +1702,11 @@ void BackupDevice::forceManualBackupType()
state = RUNNING;
}
BackupDeviceFileInfo BackupDevice::GetFileInfo()
{
return this->_info;
}
size_t BackupDevice::GetDSVFooterSize()
{
return (strlen(DESMUME_BACKUP_FOOTER_TXT) + sizeof(BackupDeviceFileSaveFooter));

View File

@ -149,14 +149,14 @@ public:
bool load_movie(EMUFILE &is);
BackupDeviceFileInfo _info;
bool isMovieMode;
u32 importDataSize(const char *filename);
bool importData(const char *filename, u32 force_size = 0);
bool exportData(const char *filename);
BackupDeviceFileInfo GetFileInfo();
static size_t GetDSVFooterSize();
static bool GetDSVFileInfo(FILE *inFileDSV, BackupDeviceFileSaveFooter *outFooter, size_t *outFileSize);
@ -167,6 +167,7 @@ private:
EMUFILE *fpMC;
std::string _fileName;
u32 fsize;
BackupDeviceFileInfo _info;
int readFooter();
bool write(u8 val);
u8 read();