- only quit Bochs simulation after pressing the "Quit" button in the runtime

config dialog. Now the close button and the ESC key let the simulation
  continue in the runtime case (fixes SF bug #3510403).
This commit is contained in:
Volker Ruppert 2012-03-29 17:05:44 +00:00
parent 279c61dc67
commit 601bb7e084
3 changed files with 13 additions and 2 deletions

View File

@ -631,7 +631,12 @@ static BOOL CALLBACK MainMenuDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
SetFocus(GetDlgItem(hDlg, choice));
return FALSE;
case WM_CLOSE:
EndDialog(hDlg, -1);
if (runtime) {
EndDialog(hDlg, 1);
} else {
bx_user_quit = 1;
EndDialog(hDlg, -1);
}
break;
case WM_COMMAND:
code = HIWORD(wParam);
@ -708,6 +713,11 @@ static BOOL CALLBACK MainMenuDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
EndDialog(hDlg, 1);
break;
case IDCANCEL:
if (runtime) {
EndDialog(hDlg, 1);
break;
}
case IDQUIT:
bx_user_quit = 1;
EndDialog(hDlg, -1);
break;

View File

@ -10,6 +10,7 @@
#define IDEDITBOX 1170
#define IDSIMU 1180
#define IDRESTORE 1190
#define IDQUIT 1195
#define LOGOPT_DLG 1200
#define IDDEVLIST 1210
#define IDLOGLBL1 1221

View File

@ -68,7 +68,7 @@ BEGIN
GROUPBOX "Simulation", IDSIMU, 195, 10, 70, 77
DEFPUSHBUTTON "Sta&rt", IDOK, 205, 25, 50, 14
PUSHBUTTON "Restore St&ate", IDRESTORE, 205, 45, 50, 14
PUSHBUTTON "&Quit", IDCANCEL, 205, 65, 50, 14
PUSHBUTTON "&Quit", IDQUIT, 205, 65, 50, 14
END
LOGOPT_DLG DIALOG 30, 30, 240, 180