- some fixes to avoid segfaults after early panics
- fixed gameport log type - wx: store mouse capture mode in the gui code (only access the mouse parameter when the capture mode changes) - wx: don't initialize wxScreen if already done and clear screen on exit
This commit is contained in:
parent
190b9391cf
commit
4cf2f745d1
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: bochs.h,v 1.196 2006-09-09 11:28:52 vruppert Exp $
|
||||
// $Id: bochs.h,v 1.197 2006-09-12 13:05:07 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -294,7 +294,7 @@ enum {
|
||||
CPU10LOG, CPU11LOG, CPU12LOG, CPU13LOG, CPU14LOG, CPU15LOG, CTRLLOG,
|
||||
UNMAPLOG, SERRLOG, BIOSLOG, PIT81LOG, PIT82LOG, IODEBUGLOG, PCI2ISALOG,
|
||||
PLUGINLOG, EXTFPUIRQLOG , PCIVGALOG, PCIUSBLOG, VTIMERLOG, STIMERLOG,
|
||||
PCIIDELOG, PCIDEVLOG, PCIPNICLOG, SPEAKERLOG, BUSMLOG
|
||||
PCIIDELOG, PCIDEVLOG, PCIPNICLOG, SPEAKERLOG, BUSMLOG, GAMELOG
|
||||
};
|
||||
|
||||
class BOCHSAPI iofunctions {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// $Id: wx.cc,v 1.86 2006-09-03 05:52:52 vruppert Exp $
|
||||
// $Id: wx.cc,v 1.87 2006-09-12 13:05:07 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// wxWidgets VGA display for Bochs. wx.cc implements a custom
|
||||
@ -112,6 +112,7 @@ static struct {
|
||||
wxCriticalSection event_thread_lock;
|
||||
BxEvent event_queue[MAX_EVENTS];
|
||||
unsigned long num_events = 0;
|
||||
static bx_bool mouse_captured = 0;
|
||||
#if defined (wxHAS_RAW_KEY_CODES) && defined(__WXGTK__)
|
||||
static Bit32u convertStringToGDKKey (const char *string);
|
||||
#endif
|
||||
@ -233,7 +234,7 @@ void MyPanel::OnMouse(wxMouseEvent& event)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SIM->get_param_bool(BXPN_MOUSE_ENABLED)->get())
|
||||
if (!mouse_captured)
|
||||
return; // mouse disabled, ignore the event
|
||||
|
||||
// process buttons and motion together
|
||||
@ -902,8 +903,10 @@ bx_wx_gui_c::specific_init(int argc, char **argv, unsigned tilewidth, unsigned t
|
||||
IFDBG_VGA(wxLogDebug (wxT ("MyPanel::specific_init trying to get lock. wxScreen=%p", wxScreen)));
|
||||
wxCriticalSectionLocker lock(wxScreen_lock);
|
||||
IFDBG_VGA(wxLogDebug (wxT ("MyPanel::specific_init got lock. wxScreen=%p", wxScreen)));
|
||||
if (wxScreen == NULL) {
|
||||
wxScreen = (char *)malloc(wxScreenX * wxScreenY * 3);
|
||||
memset(wxScreen, 0, wxScreenX * wxScreenY * 3);
|
||||
}
|
||||
|
||||
wxTileX = tilewidth;
|
||||
wxTileY = tileheight;
|
||||
@ -1581,15 +1584,14 @@ bx_wx_gui_c::replace_bitmap(unsigned hbar_id, unsigned bmap_id)
|
||||
// Called before bochs terminates, to allow for a graceful
|
||||
// exit from the native GUI mechanism.
|
||||
|
||||
void
|
||||
bx_wx_gui_c::exit(void)
|
||||
void bx_wx_gui_c::exit(void)
|
||||
{
|
||||
BX_INFO(("bx_wx_gui_c::exit() not implemented yet."));
|
||||
clear_screen();
|
||||
}
|
||||
|
||||
void
|
||||
bx_wx_gui_c::mouse_enabled_changed_specific (bx_bool val)
|
||||
void bx_wx_gui_c::mouse_enabled_changed_specific(bx_bool val)
|
||||
{
|
||||
mouse_captured = val;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: gameport.cc,v 1.11 2006-09-10 17:18:44 vruppert Exp $
|
||||
// $Id: gameport.cc,v 1.12 2006-09-12 13:05:07 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2003 MandrakeSoft S.A.
|
||||
@ -75,7 +75,8 @@ void libgameport_LTX_plugin_fini(void)
|
||||
bx_gameport_c::bx_gameport_c()
|
||||
{
|
||||
put("GAME");
|
||||
settype(EXTFPUIRQLOG);
|
||||
settype(GAMELOG);
|
||||
joyfd = -1;
|
||||
}
|
||||
|
||||
bx_gameport_c::~bx_gameport_c()
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: keyboard.cc,v 1.123 2006-09-10 17:18:44 vruppert Exp $
|
||||
// $Id: keyboard.cc,v 1.124 2006-09-12 13:05:07 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -84,6 +84,7 @@ bx_keyb_c::bx_keyb_c()
|
||||
{
|
||||
put("KBD");
|
||||
settype(KBDLOG);
|
||||
pastebuf = NULL;
|
||||
}
|
||||
|
||||
bx_keyb_c::~bx_keyb_c()
|
||||
@ -114,7 +115,7 @@ void bx_keyb_c::resetinternals(bx_bool powerup)
|
||||
|
||||
void bx_keyb_c::init(void)
|
||||
{
|
||||
BX_DEBUG(("Init $Id: keyboard.cc,v 1.123 2006-09-10 17:18:44 vruppert Exp $"));
|
||||
BX_DEBUG(("Init $Id: keyboard.cc,v 1.124 2006-09-12 13:05:07 vruppert Exp $"));
|
||||
Bit32u i;
|
||||
|
||||
DEV_register_irq(1, "8042 Keyboard controller");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: serial.cc,v 1.73 2006-09-10 17:18:44 vruppert Exp $
|
||||
// $Id: serial.cc,v 1.74 2006-09-12 13:05:07 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2004 MandrakeSoft S.A.
|
||||
@ -70,6 +70,7 @@ bx_serial_c::bx_serial_c(void)
|
||||
put("SER");
|
||||
settype(SERLOG);
|
||||
for (int i=0; i<BX_SERIAL_MAXDEV; i++) {
|
||||
s[i].io_mode = BX_SER_MODE_NULL;
|
||||
s[i].tty_id = -1;
|
||||
s[i].tx_timer_index = BX_NULL_TIMER_HANDLE;
|
||||
s[i].rx_timer_index = BX_NULL_TIMER_HANDLE;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: plugin.cc,v 1.19 2006-09-10 09:13:47 vruppert Exp $
|
||||
// $Id: plugin.cc,v 1.20 2006-09-12 13:05:07 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This file defines the plugin and plugin-device registration functions and
|
||||
@ -631,7 +631,7 @@ void bx_unload_plugins()
|
||||
device_t *device, *next;
|
||||
|
||||
device = devices;
|
||||
do {
|
||||
while (device != NULL) {
|
||||
if (device->plugin != NULL) {
|
||||
#if BX_PLUGINS
|
||||
bx_unload_plugin(device->name);
|
||||
@ -642,7 +642,7 @@ void bx_unload_plugins()
|
||||
next = device->next;
|
||||
free(device);
|
||||
device = next;
|
||||
} while (device != NULL);
|
||||
};
|
||||
devices = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user