Fix two bugs with emulation settings dialog.

This commit is contained in:
luigi__ 2009-06-05 11:52:03 +00:00
parent b95d041976
commit 343c013385
1 changed files with 32 additions and 31 deletions

View File

@ -3680,6 +3680,10 @@ LRESULT CALLBACK EmulationSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, L
EnableWindow(cur, FALSE); EnableWindow(cur, FALSE);
cur = GetDlgItem(hDlg, IDC_FIRMWAREBROWSE); cur = GetDlgItem(hDlg, IDC_FIRMWAREBROWSE);
EnableWindow(cur, FALSE); EnableWindow(cur, FALSE);
}
if((CommonSettings.UseExtBIOS == false) || (CommonSettings.UseExtFirmware == false))
{
cur = GetDlgItem(hDlg, IDC_FIRMWAREBOOT); cur = GetDlgItem(hDlg, IDC_FIRMWAREBOOT);
EnableWindow(cur, FALSE); EnableWindow(cur, FALSE);
} }
@ -3697,8 +3701,6 @@ LRESULT CALLBACK EmulationSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, L
if(romloaded) if(romloaded)
val = MessageBox(hDlg, "The current ROM needs to be reset to apply changes.\nReset now ?", "DeSmuME", (MB_YESNO | MB_ICONQUESTION)); val = MessageBox(hDlg, "The current ROM needs to be reset to apply changes.\nReset now ?", "DeSmuME", (MB_YESNO | MB_ICONQUESTION));
if((!romloaded) || (val == IDYES))
{
HWND cur; HWND cur;
CommonSettings.UseExtBIOS = IsDlgButtonChecked(hDlg, IDC_USEEXTBIOS); CommonSettings.UseExtBIOS = IsDlgButtonChecked(hDlg, IDC_USEEXTBIOS);
@ -3725,12 +3727,11 @@ LRESULT CALLBACK EmulationSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, L
WritePrivateProfileString("Firmware", "FirmwareFile", CommonSettings.Firmware, IniName); WritePrivateProfileString("Firmware", "FirmwareFile", CommonSettings.Firmware, IniName);
WritePrivateProfileInt("Firmware", "BootFromFirmware", ((CommonSettings.BootFromFirmware == true) ? 1 : 0), IniName); WritePrivateProfileInt("Firmware", "BootFromFirmware", ((CommonSettings.BootFromFirmware == true) ? 1 : 0), IniName);
if(romloaded) if(val == IDYES)
{ {
NDS_Reset(); NDS_Reset();
} }
} }
}
case IDCANCEL: case IDCANCEL:
{ {
EndDialog(hDlg, TRUE); EndDialog(hDlg, TRUE);