diff --git a/bochs/gui/textconfig.cc b/bochs/gui/textconfig.cc index a5b8d724b..bcaf4f515 100644 --- a/bochs/gui/textconfig.cc +++ b/bochs/gui/textconfig.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: textconfig.cc,v 1.24 2004-05-31 13:08:43 vruppert Exp $ +// $Id: textconfig.cc,v 1.25 2004-06-05 08:40:24 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // This is code for a text-mode configuration interface. Note that this file @@ -460,44 +460,45 @@ int bx_config_interface (int menu) choice = RuntimeOptionsDialog(); #else build_runtime_options_prompt (runtime_menu_prompt, prompt, 1024); - if (ask_uint (prompt, 1, 13, 12, &choice, 10) < 0) return -1; + if (ask_uint (prompt, 1, BX_CI_RT_QUIT, BX_CI_RT_CONT, &choice, 10) < 0) return -1; #endif switch (choice) { - case 1: + case BX_CI_RT_FLOPPYA: SIM->get_floppy_options (0, &floppyop); - if (floppyop.Odevtype->get () != BX_FLOPPY_NONE) do_menu (BXP_FLOPPYA); - break; - case 2: + if (floppyop.Odevtype->get () != BX_FLOPPY_NONE) do_menu (BXP_FLOPPYA); + break; + case BX_CI_RT_FLOPPYB: SIM->get_floppy_options (1, &floppyop); - if (floppyop.Odevtype->get () != BX_FLOPPY_NONE) do_menu (BXP_FLOPPYB); - break; - case 3: - case 4: - case 5: - case 6: - int device; + if (floppyop.Odevtype->get () != BX_FLOPPY_NONE) do_menu (BXP_FLOPPYB); + break; + case BX_CI_RT_CDROM1: + case BX_CI_RT_CDROM2: + case BX_CI_RT_CDROM3: + case BX_CI_RT_CDROM4: + int device; if (SIM->get_cdrom_options (choice - 3, &cdromop, &device) && cdromop.Opresent->get ()) { - // disable type selection - SIM->get_param((bx_id)(BXP_ATA0_MASTER_TYPE + device))->set_enabled(0); - SIM->get_param((bx_id)(BXP_ATA0_MASTER_MODEL + device))->set_enabled(0); - SIM->get_param((bx_id)(BXP_ATA0_MASTER_BIOSDETECT + device))->set_enabled(0); + // disable type selection + SIM->get_param((bx_id)(BXP_ATA0_MASTER_TYPE + device))->set_enabled(0); + SIM->get_param((bx_id)(BXP_ATA0_MASTER_MODEL + device))->set_enabled(0); + SIM->get_param((bx_id)(BXP_ATA0_MASTER_BIOSDETECT + device))->set_enabled(0); do_menu ((bx_id)(BXP_ATA0_MASTER + device)); - } - break; - case 7: // not implemented yet because I would have to mess with - // resetting timers and pits and everything on the fly. - // askparam (BXP_IPS); - break; - case 8: bx_log_options (0); break; - case 9: bx_log_options (1); break; - case 10: NOT_IMPLEMENTED (choice); break; - case 11: do_menu (BXP_MENU_RUNTIME); break; - case 12: fprintf (stderr, "Continuing simulation\n"); return 0; - case 13: - fprintf (stderr, "You chose quit on the configuration interface.\n"); + } + break; + case BX_CI_RT_IPS: + // not implemented yet because I would have to mess with + // resetting timers and pits and everything on the fly. + // askparam (BXP_IPS); + break; + case BX_CI_RT_LOGOPTS1: bx_log_options (0); break; + case BX_CI_RT_LOGOPTS2: bx_log_options (1); break; + case BX_CI_RT_INST_TR: NOT_IMPLEMENTED (choice); break; + case BX_CI_RT_MISC: do_menu (BXP_MENU_RUNTIME); break; + case BX_CI_RT_CONT: fprintf (stderr, "Continuing simulation\n"); return 0; + case BX_CI_RT_QUIT: + fprintf (stderr, "You chose quit on the configuration interface.\n"); bx_user_quit = 1; - SIM->quit_sim (1); - return -1; + SIM->quit_sim (1); + return -1; default: fprintf (stderr, "Menu choice %d not implemented.\n", choice); } break; diff --git a/bochs/gui/textconfig.h b/bochs/gui/textconfig.h index 08ff1f2d6..78f47ecd4 100644 --- a/bochs/gui/textconfig.h +++ b/bochs/gui/textconfig.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: textconfig.h,v 1.2 2004-01-29 18:50:33 vruppert Exp $ +// $Id: textconfig.h,v 1.3 2004-06-05 08:40:24 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // @@ -21,6 +21,22 @@ enum { BX_CI_N_MENUS }; +enum { + BX_CI_RT_FLOPPYA = 1, + BX_CI_RT_FLOPPYB, + BX_CI_RT_CDROM1, + BX_CI_RT_CDROM2, + BX_CI_RT_CDROM3, + BX_CI_RT_CDROM4, + BX_CI_RT_IPS, + BX_CI_RT_LOGOPTS1, + BX_CI_RT_LOGOPTS2, + BX_CI_RT_INST_TR, + BX_CI_RT_MISC, + BX_CI_RT_CONT, + BX_CI_RT_QUIT +}; + int init_text_config_interface (); #endif diff --git a/bochs/gui/win32dialog.cc b/bochs/gui/win32dialog.cc index 448137af9..cda9e744e 100644 --- a/bochs/gui/win32dialog.cc +++ b/bochs/gui/win32dialog.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: win32dialog.cc,v 1.21 2004-05-23 10:47:00 vruppert Exp $ +// $Id: win32dialog.cc,v 1.22 2004-06-05 08:40:24 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// #include "config.h" @@ -13,6 +13,7 @@ extern "C" { } #include "win32res.h" #include "siminterface.h" +#include "textconfig.h" #include "win32dialog.h" const char log_choices[5][16] = {"ignore", "log", "ask user", "end simulation", "no change"}; @@ -309,6 +310,7 @@ void RuntimeDlgSetTab(HWND hDlg, int tabnum) ShowWindow(GetDlgItem(hDlg, IDMOUSE), (tabnum == 2) ? SW_SHOW : SW_HIDE); ShowWindow(GetDlgItem(hDlg, IDKBDPASTE), (tabnum == 2) ? SW_SHOW : SW_HIDE); ShowWindow(GetDlgItem(hDlg, IDUSERBTN), (tabnum == 2) ? SW_SHOW : SW_HIDE); + ShowWindow(GetDlgItem(hDlg, IDSB16TIMER), (tabnum == 2) ? SW_SHOW : SW_HIDE); ShowWindow(GetDlgItem(hDlg, IDSBLOGLEV), (tabnum == 2) ? SW_SHOW : SW_HIDE); } @@ -450,7 +452,7 @@ static BOOL CALLBACK RuntimeDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l for (device=1; deviceset(origpath[device]); } - EndDialog(hDlg, 16); + EndDialog(hDlg, BX_CI_RT_QUIT); break; case WM_COMMAND: old_changed = changed; @@ -585,13 +587,13 @@ static BOOL CALLBACK RuntimeDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM l changed = 0; break; case IDOK: - EndDialog(hDlg, 15); + EndDialog(hDlg, BX_CI_RT_CONT); break; case IDCANCEL: for (device=1; deviceset(origpath[device]); } - EndDialog(hDlg, 16); + EndDialog(hDlg, BX_CI_RT_QUIT); break; } }