- to make the "idle hack" compile again, add virtual function sim_is_idle

to bx_gui_c and to bx_x_gui_c.
This commit is contained in:
Bryce Denney 2002-10-27 23:33:13 +00:00
parent d5443fcba3
commit db750f8234
2 changed files with 11 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: gui.h,v 1.33 2002-10-25 11:44:37 bdenney Exp $
// $Id: gui.h,v 1.34 2002-10-27 23:33:13 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -60,6 +60,10 @@ public:
virtual Bit32u get_sighandler_mask () {return 0;}
// called when registered signal arrives
virtual void sighandler (int sig) {}
#if BX_USE_IDLE_HACK
// this is called from the CPU model when the HLT instruction is executed.
virtual void sim_is_idle(void) {}
#endif
// The following function(s) are defined already, and your
// GUI code calls them
@ -72,9 +76,6 @@ public:
void update_drive_status_buttons (void);
static void mouse_enabled_changed (bx_bool val);
static void init_signal_handlers ();
#if BX_USE_IDLE_HACK
static void sim_is_idle(void);
#endif
protected:

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: x.cc,v 1.52 2002-10-25 11:44:37 bdenney Exp $
// $Id: x.cc,v 1.53 2002-10-27 23:33:13 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -47,6 +47,9 @@ class bx_x_gui_c : public bx_gui_c {
public:
bx_x_gui_c (void);
DECLARE_GUI_VIRTUAL_METHODS()
#if BX_USE_IDLE_HACK
virtual void sim_is_idle(void);
#endif
};
// declare one instance of the gui object and call macro to insert the
@ -1545,7 +1548,7 @@ Bool XPeekEventTimeout( Display *display, XEvent *event_return, struct timeval *
return(True);
}
#if BX_USE_IDLE_HACK
void bx_x_gui_c::sim_is_idle () {
XEvent dummy;
struct timeval timeout;
@ -1553,4 +1556,5 @@ void bx_x_gui_c::sim_is_idle () {
timeout.tv_usec = 1000; /* 1/1000 s */
XPeekEventTimeout(bx_x_display, &dummy, &timeout);
}
#endif
#endif /* BX_USE_IDLE_HACK */