- fix interface menu
This commit is contained in:
parent
8e7c2e42f3
commit
dffe013ff8
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* gui/control.cc
|
* gui/control.cc
|
||||||
* $Id: control.cc,v 1.5 2001-06-09 21:19:58 bdenney Exp $
|
* $Id: control.cc,v 1.6 2001-06-09 21:29:07 bdenney Exp $
|
||||||
*
|
*
|
||||||
* This is code for a text-mode control panel. Note that this file
|
* This is code for a text-mode control panel. Note that this file
|
||||||
* does NOT include bochs.h. Instead, it does all of its contact with
|
* does NOT include bochs.h. Instead, it does all of its contact with
|
||||||
@ -78,6 +78,7 @@ void bx_edit_cdrom ();
|
|||||||
void bx_edit_rom_path (int vga);
|
void bx_edit_rom_path (int vga);
|
||||||
void bx_edit_rom_addr ();
|
void bx_edit_rom_addr ();
|
||||||
void bx_newhd_support ();
|
void bx_newhd_support ();
|
||||||
|
void bx_private_colormap ();
|
||||||
void bx_boot_from ();
|
void bx_boot_from ();
|
||||||
void bx_ips_change ();
|
void bx_ips_change ();
|
||||||
int bx_read_rc (char *rc);
|
int bx_read_rc (char *rc);
|
||||||
@ -476,32 +477,26 @@ int bx_control_panel (int menu)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#if 0
|
|
||||||
case BX_CPANEL_START_OPTS_INTERFACE:
|
case BX_CPANEL_START_OPTS_INTERFACE:
|
||||||
{
|
{
|
||||||
char prompt[1024];
|
char prompt[1024];
|
||||||
int interval;
|
int interval = SIM->get_vga_update_interval ();
|
||||||
SIM->get_vga_update_interval (&interval);
|
|
||||||
sprintf (prompt, startup_interface_options,
|
sprintf (prompt, startup_interface_options,
|
||||||
interval,
|
interval,
|
||||||
SIM->get_mouse_enabled (),
|
SIM->get_mouse_enabled () ? "enabled" : "disabled",
|
||||||
SIM->getips ());
|
SIM->getips (),
|
||||||
build_disk_options_prompt (startup_disk_options_prompt, prompt, 1024);
|
SIM->get_private_colormap () ? "enabled" : "disabled");
|
||||||
if (ask_int (prompt, 0, 7, 0, &choice) < 0) return -1;
|
if (ask_int (prompt, 0, 4, 0, &choice) < 0) return -1;
|
||||||
switch (choice) {
|
switch (choice) {
|
||||||
case 0: return 0;
|
case 0: return 0;
|
||||||
case 1: bx_edit_floppy (0); break;
|
case 1: bx_vga_update_interval (); break;
|
||||||
case 2: bx_edit_floppy (1); break;
|
case 2: bx_mouse_enable (); break;
|
||||||
case 3: bx_edit_hard_disk (0); break;
|
case 3: bx_ips_change (); break;
|
||||||
case 4: bx_edit_hard_disk (1); break;
|
case 4: bx_private_colormap (); break;
|
||||||
case 5: bx_edit_cdrom (); break;
|
|
||||||
case 6: bx_newhd_support (); break;
|
|
||||||
case 7: bx_boot_from (); break;
|
|
||||||
default: BAD_OPTION(menu, choice);
|
default: BAD_OPTION(menu, choice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case BX_CPANEL_RUNTIME:
|
case BX_CPANEL_RUNTIME:
|
||||||
if (ask_int (runtime_menu_prompt, 1, 9, 8, &choice) < 0) return -1;
|
if (ask_int (runtime_menu_prompt, 1, 9, 8, &choice) < 0) return -1;
|
||||||
switch (choice) {
|
switch (choice) {
|
||||||
@ -614,6 +609,15 @@ void bx_newhd_support ()
|
|||||||
SIM->set_newhd_support (newval);
|
SIM->set_newhd_support (newval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bx_private_colormap ()
|
||||||
|
{
|
||||||
|
int newval, oldval = SIM->get_private_colormap ();
|
||||||
|
if (ask_yn ("Use private colormap? [%s] ", oldval, &newval) < 0) return;
|
||||||
|
if (newval == oldval) return;
|
||||||
|
SIM->set_private_colormap (newval);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void bx_boot_from ()
|
void bx_boot_from ()
|
||||||
{
|
{
|
||||||
int newval, oldval = SIM->get_boot_hard_disk ();
|
int newval, oldval = SIM->get_boot_hard_disk ();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* gui/siminterface.cc
|
* gui/siminterface.cc
|
||||||
* $Id: siminterface.cc,v 1.6 2001-06-09 21:19:58 bdenney Exp $
|
* $Id: siminterface.cc,v 1.7 2001-06-09 21:29:07 bdenney Exp $
|
||||||
*
|
*
|
||||||
* Defines the actual link between bx_simulator_interface_c methods
|
* Defines the actual link between bx_simulator_interface_c methods
|
||||||
* and the simulator. This file includes bochs.h because it needs
|
* and the simulator. This file includes bochs.h because it needs
|
||||||
@ -62,6 +62,8 @@ class bx_real_sim_c : public bx_simulator_interface_c {
|
|||||||
virtual int set_vga_path (char *path);
|
virtual int set_vga_path (char *path);
|
||||||
virtual int get_rom_address ();
|
virtual int get_rom_address ();
|
||||||
virtual int set_rom_address (int addr);
|
virtual int set_rom_address (int addr);
|
||||||
|
virtual int get_private_colormap ();
|
||||||
|
virtual void set_private_colormap (int en);
|
||||||
};
|
};
|
||||||
|
|
||||||
void init_siminterface ()
|
void init_siminterface ()
|
||||||
@ -147,7 +149,9 @@ bx_real_sim_c::get_vga_update_interval () {
|
|||||||
|
|
||||||
void
|
void
|
||||||
bx_real_sim_c::set_vga_update_interval (unsigned interval) {
|
bx_real_sim_c::set_vga_update_interval (unsigned interval) {
|
||||||
bx_vga.set_update_interval (interval);
|
bx_options.vga_update_interval = interval;
|
||||||
|
if (get_init_done ())
|
||||||
|
bx_vga.set_update_interval (interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
int bx_real_sim_c::get_mouse_enabled () {
|
int bx_real_sim_c::get_mouse_enabled () {
|
||||||
@ -155,7 +159,9 @@ int bx_real_sim_c::get_mouse_enabled () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void bx_real_sim_c::set_mouse_enabled (int en) {
|
void bx_real_sim_c::set_mouse_enabled (int en) {
|
||||||
bx_gui.gui_set_mouse_enable (en!=0);
|
bx_options.mouse_enabled = en;
|
||||||
|
if (get_init_done ())
|
||||||
|
bx_gui.gui_set_mouse_enable (en!=0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -340,3 +346,14 @@ bx_real_sim_c::set_rom_address (int addr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
bx_real_sim_c::get_private_colormap ()
|
||||||
|
{
|
||||||
|
return bx_options.private_colormap;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
bx_real_sim_c::set_private_colormap (int en)
|
||||||
|
{
|
||||||
|
bx_options.private_colormap = en;
|
||||||
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* gui/siminterface.h
|
* gui/siminterface.h
|
||||||
* $Id: siminterface.h,v 1.3 2001-06-09 21:12:16 bdenney Exp $
|
* $Id: siminterface.h,v 1.4 2001-06-09 21:29:07 bdenney Exp $
|
||||||
*
|
*
|
||||||
* Interface to the simulator, currently only used by control.cc.
|
* Interface to the simulator, currently only used by control.cc.
|
||||||
* The base class bx_simulator_interface_c, contains only virtual functions
|
* The base class bx_simulator_interface_c, contains only virtual functions
|
||||||
@ -95,6 +95,8 @@ public:
|
|||||||
virtual int set_vga_path (char *path) {return -1;}
|
virtual int set_vga_path (char *path) {return -1;}
|
||||||
virtual int get_rom_address () {return -1;}
|
virtual int get_rom_address () {return -1;}
|
||||||
virtual int set_rom_address (int addr) {return -1;}
|
virtual int set_rom_address (int addr) {return -1;}
|
||||||
|
virtual int get_private_colormap () { return -1; }
|
||||||
|
virtual void set_private_colormap (int en) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
extern bx_simulator_interface_c *SIM;
|
extern bx_simulator_interface_c *SIM;
|
||||||
|
Loading…
Reference in New Issue
Block a user