- win32 specific option "legacyF12" added (use F12 to toggle mouse)
- display library specific options now handled in bx_reset_options() and bx_write_configuration()
This commit is contained in:
parent
d5f337e1ef
commit
2a4acc61c5
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: win32.cc,v 1.78 2004-02-16 21:47:08 vruppert Exp $
|
||||
// $Id: win32.cc,v 1.79 2004-02-23 16:33:52 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -144,6 +144,7 @@ static unsigned x_edge=0, y_edge=0, y_caption=0;
|
||||
static int xChar = 8, yChar = 16;
|
||||
static unsigned int text_rows=25, text_cols=80;
|
||||
static BOOL BxTextMode = TRUE;
|
||||
static BOOL legacyF12 = FALSE;
|
||||
#if !BX_USE_WINDOWS_FONTS
|
||||
static Bit8u h_panning = 0, v_panning = 0;
|
||||
#else
|
||||
@ -571,8 +572,12 @@ void terminateEmul(int reason) {
|
||||
// it's height is defined by this parameter.
|
||||
|
||||
void bx_win32_gui_c::specific_init(int argc, char **argv, unsigned
|
||||
tilewidth, unsigned tileheight,
|
||||
unsigned headerbar_y) {
|
||||
tilewidth, unsigned tileheight,
|
||||
unsigned headerbar_y) {
|
||||
char *ptr;
|
||||
char string[512];
|
||||
int i, string_i;
|
||||
|
||||
put("WGUI");
|
||||
static RGBQUAD black_quad={ 0, 0, 0, 0};
|
||||
stInfo.kill = 0;
|
||||
@ -650,6 +655,24 @@ void bx_win32_gui_c::specific_init(int argc, char **argv, unsigned
|
||||
if(bx_options.keyboard.OuseMapping->get()) {
|
||||
bx_keymap.loadKeymap(NULL); // I have no function to convert X windows symbols
|
||||
}
|
||||
|
||||
// parse win32 specific options
|
||||
if (argc == 2) {
|
||||
ptr = strtok(argv[1], ",");
|
||||
while (ptr) {
|
||||
string_i = 0;
|
||||
for (i=0; i<strlen(ptr); i++) {
|
||||
if (!isspace(ptr[i])) string[string_i++] = ptr[i];
|
||||
}
|
||||
string[string_i] = '\0';
|
||||
if (!strcmp(string, "legacyF12")) {
|
||||
legacyF12 = TRUE;
|
||||
} else {
|
||||
BX_PANIC(("Unknown win32 option '%s'", string));
|
||||
}
|
||||
ptr = strtok(NULL, ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -996,6 +1019,11 @@ LRESULT CALLBACK simWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
case WM_KEYDOWN:
|
||||
case WM_SYSKEYDOWN:
|
||||
if (legacyF12 && (wParam == VK_F12)) {
|
||||
mouseCaptureMode = !mouseCaptureMode;
|
||||
SetMouseCapture();
|
||||
return 0;
|
||||
}
|
||||
EnterCriticalSection(&stInfo.keyCS);
|
||||
enq_key_event(HIWORD (lParam) & 0x01FF, BX_KEY_PRESSED);
|
||||
LeaveCriticalSection(&stInfo.keyCS);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: main.cc,v 1.271 2004-02-22 18:51:37 vruppert Exp $
|
||||
// $Id: main.cc,v 1.272 2004-02-23 16:33:51 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -1707,6 +1707,7 @@ void bx_reset_options ()
|
||||
bx_options.vgarom.Opath->reset();
|
||||
|
||||
// interface
|
||||
bx_options.Odisplaylib_options->reset();
|
||||
bx_options.Ovga_update_interval->reset();
|
||||
bx_options.Omouse_enabled->reset();
|
||||
bx_options.Oips->reset();
|
||||
@ -4488,7 +4489,11 @@ bx_write_configuration (char *rc, int overwrite)
|
||||
// finally it's open and we can start writing.
|
||||
fprintf (fp, "# configuration file generated by Bochs\n");
|
||||
fprintf (fp, "config_interface: %s\n", bx_options.Osel_config->get_choice(bx_options.Osel_config->get()));
|
||||
fprintf (fp, "display_library: %s\n", bx_options.Osel_displaylib->get_choice(bx_options.Osel_displaylib->get()));
|
||||
fprintf (fp, "display_library: %s", bx_options.Osel_displaylib->get_choice(bx_options.Osel_displaylib->get()));
|
||||
if (strlen (bx_options.Odisplaylib_options->getptr ()) > 0)
|
||||
fprintf (fp, ", options=\"%s\"\n", bx_options.Odisplaylib_options->getptr ());
|
||||
else
|
||||
fprintf (fp, "\n");
|
||||
fprintf (fp, "megs: %d\n", bx_options.memory.Osize->get ());
|
||||
if (strlen (bx_options.rom.Opath->getptr ()) > 0)
|
||||
fprintf (fp, "romimage: file=%s, address=0x%05x\n", bx_options.rom.Opath->getptr(), (unsigned int)bx_options.rom.Oaddress->get ());
|
||||
|
Loading…
Reference in New Issue
Block a user