- add string parameter called screenmode
- put #if BX_USE_AMIGAOS...#endif around fullscreen and screenmode, since they only apply to amiga
This commit is contained in:
parent
595d6a0132
commit
72d28e5a87
@ -306,6 +306,7 @@ private_colormap: enabled=0
|
||||
# fullscreen: enabled=1
|
||||
#=======================================================================
|
||||
fullscreen: enabled=0
|
||||
screenmode: name="sample"
|
||||
|
||||
#=======================================================================
|
||||
# other stuff
|
||||
|
@ -595,7 +595,10 @@ typedef struct {
|
||||
bx_param_bool_c *Osystem_clock_sync;
|
||||
bx_param_bool_c *Omouse_enabled;
|
||||
bx_param_bool_c *Oprivate_colormap;
|
||||
#if BX_USE_AMIGAOS
|
||||
bx_param_bool_c *Ofullscreen;
|
||||
bx_param_string_c *Oscreenmode;
|
||||
#endif
|
||||
bx_param_bool_c *Oi440FXSupport;
|
||||
bx_cmos_options cmos;
|
||||
bx_ne2k_options ne2k;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* gui/siminterface.h
|
||||
* $Id: siminterface.h,v 1.23 2001-08-15 20:17:19 bdenney Exp $
|
||||
* $Id: siminterface.h,v 1.24 2001-08-16 02:00:31 bdenney Exp $
|
||||
*
|
||||
* Interface to the simulator, currently only used by control.cc.
|
||||
* The base class bx_simulator_interface_c, contains only virtual functions
|
||||
@ -55,6 +55,7 @@ typedef enum {
|
||||
BXP_CDROMD,
|
||||
BXP_PRIVATE_COLORMAP,
|
||||
BXP_FULLSCREEN,
|
||||
BXP_SCREENMODE,
|
||||
BXP_I440FX_SUPPORT,
|
||||
BXP_NEWHARDDRIVESUPPORT,
|
||||
BXP_LOG_FILENAME,
|
||||
|
@ -81,7 +81,10 @@ bx_options_t bx_options = {
|
||||
NULL, // system clock sync
|
||||
NULL, // default mouse_enabled
|
||||
NULL, // default private_colormap
|
||||
#if BX_USE_AMIGAOS
|
||||
NULL, // full screen mode
|
||||
NULL, // screen mode
|
||||
#endif
|
||||
NULL, // default i440FXSupport
|
||||
{NULL, NULL}, // cmos path, cmos image boolean
|
||||
{ NULL, NULL, NULL, NULL, NULL, NULL }, // ne2k
|
||||
@ -192,6 +195,11 @@ char *bx_param_string_handler (bx_param_string_c *param, int set, char *val, int
|
||||
SIM->get_param_num(BXP_CDROM_INSERTED)->set_enabled (!empty);
|
||||
}
|
||||
break;
|
||||
case BXP_SCREENMODE:
|
||||
if (set==1) {
|
||||
BX_INFO (("Screen mode changed to %s", val));
|
||||
}
|
||||
break;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
@ -481,14 +489,21 @@ void bx_init_options ()
|
||||
"Sync with system clock",
|
||||
"This option slows down bochs if it starts to run ahead of the system clock",
|
||||
0);
|
||||
bx_options.Ofullscreen = new bx_param_bool_c (BXP_FULLSCREEN,
|
||||
"Use full screen mode",
|
||||
"When enable, bochs occupied the whole screen instead of just a window. Not implemented on all platforms.",
|
||||
0);
|
||||
bx_options.Osystem_clock_sync = new bx_param_bool_c (BXP_SYSTEM_CLOCK_SYNC,
|
||||
"Sync with system clock",
|
||||
"This option slows down bochs if it starts to run ahead of the system clock",
|
||||
0);
|
||||
#if BX_USE_AMIGAOS
|
||||
bx_options.Ofullscreen = new bx_param_bool_c (BXP_FULLSCREEN,
|
||||
"Use full screen mode",
|
||||
"When enabled, bochs occupies the whole screen instead of just a window.",
|
||||
0);
|
||||
bx_options.Oscreenmode = new bx_param_string_c (BXP_SCREENMODE,
|
||||
"Screen mode name",
|
||||
"Screen mode name",
|
||||
"", BX_PATHNAME_LEN);
|
||||
bx_options.Oscreenmode->set_handler (bx_param_string_handler);
|
||||
#endif
|
||||
bx_param_c *interface_init_list[] = {
|
||||
bx_options.Ovga_update_interval,
|
||||
bx_options.Omouse_enabled,
|
||||
@ -496,7 +511,10 @@ void bx_init_options ()
|
||||
bx_options.Omax_ips,
|
||||
bx_options.Osystem_clock_sync,
|
||||
bx_options.Oprivate_colormap,
|
||||
#if BX_USE_AMIGAOS
|
||||
bx_options.Ofullscreen,
|
||||
bx_options.Oscreenmode,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
menu = new bx_list_c (BXP_MENU_INTERFACE, "Bochs Interface Menu", "intfmenu", interface_init_list);
|
||||
@ -1413,17 +1431,30 @@ parse_line_formatted(char *context, int num_params, char *params[])
|
||||
}
|
||||
}
|
||||
else if (!strcmp(params[0], "fullscreen")) {
|
||||
#if BX_USE_AMIGAOS
|
||||
if (num_params != 2) {
|
||||
BX_PANIC(("%s: fullscreen directive malformed.", context));
|
||||
}
|
||||
if (strncmp(params[1], "enabled=", 8)) {
|
||||
BX_PANIC(("%s: fullscreen directive malformed.", context));
|
||||
}
|
||||
if (params[1][8] == '0' || params[1][8] == '1')
|
||||
if (params[1][8] == '0' || params[1][8] == '1') {
|
||||
bx_options.Ofullscreen->set (params[1][8] - '0');
|
||||
else {
|
||||
} else {
|
||||
BX_PANIC(("%s: fullscreen directive malformed.", context));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (!strcmp(params[0], "screenmode")) {
|
||||
#if BX_USE_AMIGAOS
|
||||
if (num_params != 2) {
|
||||
BX_PANIC(("%s: screenmode directive malformed.", context));
|
||||
}
|
||||
if (strncmp(params[1], "name=", 5)) {
|
||||
BX_PANIC(("%s: screenmode directive malformed.", context));
|
||||
}
|
||||
bx_options.Oscreenmode->set (strdup(¶ms[1][5]));
|
||||
#endif
|
||||
}
|
||||
|
||||
else if (!strcmp(params[0], "sb16")) {
|
||||
@ -1793,7 +1824,10 @@ bx_write_configuration (char *rc, int overwrite)
|
||||
fprintf (fp, "system_clock_sync: enabled=%d\n", bx_options.Osystem_clock_sync->get ());
|
||||
fprintf (fp, "mouse: enabled=%d\n", bx_options.Omouse_enabled->get ());
|
||||
fprintf (fp, "private_colormap: enabled=%d\n", bx_options.Oprivate_colormap->get ());
|
||||
fprintf (fp, "fullscreen: enabled=%d\n", bx_options.Oprivate_colormap->get ());
|
||||
#if BX_USE_AMIGAOS
|
||||
fprintf (fp, "fullscreen: enabled=%d\n", bx_options.Ofullscreen->get ());
|
||||
fprintf (fp, "screenmode: name=\"%s\"\n", bx_options.Oscreenmode->getptr ());
|
||||
#endif
|
||||
fprintf (fp, "i440fxsupport: enabled=%d\n", bx_options.Oi440FXSupport->get ());
|
||||
fprintf (fp, "time0: %u\n", bx_options.cmos.Otime0->get ());
|
||||
bx_write_ne2k_options (fp, &bx_options.ne2k);
|
||||
|
Loading…
Reference in New Issue
Block a user