Print IPS instead of mIPS to the status bar
Do not create show_ips virtual function if BX_SHOW_IPS is OFF
This commit is contained in:
parent
8a1b7ca245
commit
1ff08c3d6d
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: rfb.cc,v 1.46 2006-01-22 16:30:48 vruppert Exp $
|
||||
// $Id: rfb.cc,v 1.47 2006-01-22 18:15:48 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2000 Psyon.Org!
|
||||
@ -52,7 +52,9 @@ public:
|
||||
DECLARE_GUI_NEW_VIRTUAL_METHODS()
|
||||
void get_capabilities(Bit16u *xres, Bit16u *yres, Bit16u *bpp);
|
||||
void statusbar_setitem(int element, bx_bool active);
|
||||
#if BX_SHOW_IPS
|
||||
void show_ips(Bit32u ips_count);
|
||||
#endif
|
||||
};
|
||||
|
||||
// declare one instance of the gui object and call macro to insert the
|
||||
@ -1741,13 +1743,13 @@ bx_rfb_gui_c::get_capabilities(Bit16u *xres, Bit16u *yres, Bit16u *bpp)
|
||||
*bpp = 8;
|
||||
}
|
||||
|
||||
#if BX_SHOW_IPS
|
||||
void bx_rfb_gui_c::show_ips(Bit32u ips_count)
|
||||
{
|
||||
#if BX_SHOW_IPS
|
||||
char ips_text[40];
|
||||
sprintf(ips_text, "mIPS: %.3f", (float)ips_count / 1000000.0);
|
||||
sprintf(ips_text, "IPS: %u", ips_count);
|
||||
rfbSetStatusText(0, ips_text, 1);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* if BX_WITH_RFB */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: sdl.cc,v 1.63 2006-01-22 16:30:48 vruppert Exp $
|
||||
// $Id: sdl.cc,v 1.64 2006-01-22 18:15:48 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -53,7 +53,9 @@ public:
|
||||
DECLARE_GUI_NEW_VIRTUAL_METHODS()
|
||||
virtual void set_display_mode (disp_mode_t newmode);
|
||||
virtual void statusbar_setitem(int element, bx_bool active);
|
||||
#if BX_SHOW_IPS
|
||||
virtual void show_ips(Bit32u ips_count);
|
||||
#endif
|
||||
};
|
||||
|
||||
// declare one instance of the gui object and call macro to insert the
|
||||
@ -1543,13 +1545,13 @@ bx_sdl_gui_c::set_display_mode (disp_mode_t newmode)
|
||||
}
|
||||
}
|
||||
|
||||
#if BX_SHOW_IPS
|
||||
void bx_sdl_gui_c::show_ips(Bit32u ips_count)
|
||||
{
|
||||
#if BX_SHOW_IPS
|
||||
char ips_text[40];
|
||||
sprintf(ips_text, "mIPS: %.3f", (float)ips_count / 1000000.0);
|
||||
sprintf(ips_text, "IPS: %u", ips_count);
|
||||
sdl_set_status_text(0, ips_text, 1);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* if BX_WITH_SDL */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: win32.cc,v 1.100 2006-01-22 12:31:16 vruppert Exp $
|
||||
// $Id: win32.cc,v 1.101 2006-01-22 18:15:48 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -48,9 +48,11 @@
|
||||
class bx_win32_gui_c : public bx_gui_c {
|
||||
public:
|
||||
bx_win32_gui_c (void) {}
|
||||
DECLARE_GUI_VIRTUAL_METHODS()
|
||||
DECLARE_GUI_VIRTUAL_METHODS();
|
||||
virtual void statusbar_setitem(int element, bx_bool active);
|
||||
#if BX_SHOW_IPS
|
||||
virtual void show_ips(Bit32u ips_count);
|
||||
#endif
|
||||
};
|
||||
|
||||
// declare one instance of the gui object and call macro to insert the
|
||||
@ -2045,8 +2047,7 @@ void alarm(int time)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void
|
||||
bx_win32_gui_c::mouse_enabled_changed_specific (bx_bool val)
|
||||
void bx_win32_gui_c::mouse_enabled_changed_specific (bx_bool val)
|
||||
{
|
||||
if ((val != mouseCaptureMode) && !mouseToggleReq) {
|
||||
mouseToggleReq = TRUE;
|
||||
@ -2054,14 +2055,14 @@ bx_win32_gui_c::mouse_enabled_changed_specific (bx_bool val)
|
||||
}
|
||||
}
|
||||
|
||||
#if BX_SHOW_IPS
|
||||
void bx_win32_gui_c::show_ips(Bit32u ips_count)
|
||||
{
|
||||
#if BX_SHOW_IPS
|
||||
char ips_text[40];
|
||||
sprintf(ips_text, "mIPS: %.3f", (float)ips_count / 1000000.0);
|
||||
sprintf(ips_text, "IPS: %u", ips_count);
|
||||
SetStatusText(0, ips_text, 0);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BX_USE_WINDOWS_FONTS
|
||||
|
||||
@ -2131,7 +2132,6 @@ void DrawChar (HDC hdc, unsigned char c, int xStart, int yStart,
|
||||
void InitFont(void)
|
||||
{
|
||||
LOGFONT lf;
|
||||
int i;
|
||||
|
||||
lf.lfWidth = 8;
|
||||
lf.lfEscapement = 0;
|
||||
@ -2147,7 +2147,7 @@ void InitFont(void)
|
||||
lf.lfPitchAndFamily=FIXED_PITCH | FF_DONTCARE;
|
||||
wsprintf(lf.lfFaceName, "Lucida Console");
|
||||
|
||||
for (i=0; i < 3; i++)
|
||||
for (int i=0; i < 3; i++)
|
||||
{
|
||||
lf.lfHeight = 12 + i * 2;
|
||||
hFont[i]=CreateFontIndirect(&lf);
|
||||
@ -2156,8 +2156,7 @@ void InitFont(void)
|
||||
|
||||
void DestroyFont(void)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < 3; i++)
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
DeleteObject(hFont[i]);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// $Id: wx.cc,v 1.78 2006-01-22 16:30:48 vruppert Exp $
|
||||
// $Id: wx.cc,v 1.79 2006-01-22 18:15:48 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// wxWidgets VGA display for Bochs. wx.cc implements a custom
|
||||
@ -68,7 +68,9 @@ public:
|
||||
DECLARE_GUI_VIRTUAL_METHODS()
|
||||
DECLARE_GUI_NEW_VIRTUAL_METHODS()
|
||||
void statusbar_setitem(int element, bx_bool active);
|
||||
#if BX_SHOW_IPS
|
||||
void show_ips(Bit32u ips_count);
|
||||
#endif
|
||||
};
|
||||
|
||||
// declare one instance of the gui object and call macro to insert the
|
||||
@ -1627,14 +1629,14 @@ bx_wx_gui_c::set_clipboard_text(char *text_snapshot, Bit32u len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if BX_SHOW_IPS
|
||||
void bx_wx_gui_c::show_ips(Bit32u ips_count)
|
||||
{
|
||||
#if BX_SHOW_IPS
|
||||
char ips_text[40];
|
||||
sprintf(ips_text, "mIPS: %.3f", (float)ips_count / 1000000.0);
|
||||
sprintf(ips_text, "IPS: %u", ips_count);
|
||||
theFrame->SetStatusText(ips_text, 0);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (wxHAS_RAW_KEY_CODES) && defined(__WXGTK__)
|
||||
/* we can use the X keysyms for GTK too */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: x.cc,v 1.98 2006-01-22 12:31:16 vruppert Exp $
|
||||
// $Id: x.cc,v 1.99 2006-01-22 18:15:48 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -67,7 +67,9 @@ public:
|
||||
virtual void beep_off();
|
||||
virtual void statusbar_setitem(int element, bx_bool active);
|
||||
virtual void get_capabilities(Bit16u *xres, Bit16u *yres, Bit16u *bpp);
|
||||
#if BX_SHOW_IPS
|
||||
virtual void show_ips(Bit32u ips_count);
|
||||
#endif
|
||||
};
|
||||
|
||||
// declare one instance of the gui object and call macro to insert the
|
||||
@ -1933,36 +1935,31 @@ void bx_x_gui_c::sim_is_idle () {
|
||||
}
|
||||
#endif /* BX_USE_IDLE_HACK */
|
||||
|
||||
|
||||
void
|
||||
bx_x_gui_c::beep_on(float frequency)
|
||||
void bx_x_gui_c::beep_on(float frequency)
|
||||
{
|
||||
BX_INFO(( "X11 Beep ON (frequency=%.2f)",frequency));
|
||||
}
|
||||
|
||||
void
|
||||
bx_x_gui_c::beep_off()
|
||||
void bx_x_gui_c::beep_off()
|
||||
{
|
||||
BX_INFO(( "X11 Beep OFF"));
|
||||
}
|
||||
|
||||
void
|
||||
bx_x_gui_c::get_capabilities(Bit16u *xres, Bit16u *yres, Bit16u *bpp)
|
||||
void bx_x_gui_c::get_capabilities(Bit16u *xres, Bit16u *yres, Bit16u *bpp)
|
||||
{
|
||||
*xres = 1024;
|
||||
*yres = 768;
|
||||
*bpp = 32;
|
||||
}
|
||||
|
||||
|
||||
#if BX_SHOW_IPS
|
||||
void bx_x_gui_c::show_ips(Bit32u ips_count)
|
||||
{
|
||||
#if BX_SHOW_IPS
|
||||
char ips_text[40];
|
||||
sprintf(ips_text, "mIPS: %.3f", (float)ips_count / 1000000.0);
|
||||
sprintf(ips_text, "IPS: %u", ips_count);
|
||||
set_status_text(0, ips_text, 0);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void x11_create_button(Display *display, Drawable dialog, GC gc, int x, int y,
|
||||
unsigned int width, unsigned int height, char *text)
|
||||
|
Loading…
Reference in New Issue
Block a user