- fixed possible hangs of the 'sdl' and 'x' gui on Linux/X11 with BX_SHOW_IPS
- x gui: show mouse toggle message for around 2.5 seconds after a change if BX_SHOW_IPS is enabled - format of the ips value changed to right aligned
This commit is contained in:
parent
5a5854c684
commit
cf5215b11e
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: rfb.cc,v 1.47 2006-01-22 18:15:48 sshwarts Exp $
|
||||
// $Id: rfb.cc,v 1.48 2006-01-23 18:34:47 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2000 Psyon.Org!
|
||||
@ -1747,7 +1747,7 @@ bx_rfb_gui_c::get_capabilities(Bit16u *xres, Bit16u *yres, Bit16u *bpp)
|
||||
void bx_rfb_gui_c::show_ips(Bit32u ips_count)
|
||||
{
|
||||
char ips_text[40];
|
||||
sprintf(ips_text, "IPS: %u", ips_count);
|
||||
sprintf(ips_text, "IPS: %9u", ips_count);
|
||||
rfbSetStatusText(0, ips_text, 1);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: sdl.cc,v 1.64 2006-01-22 18:15:48 sshwarts Exp $
|
||||
// $Id: sdl.cc,v 1.65 2006-01-23 18:34:47 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -122,6 +122,10 @@ static unsigned statusitem_pos[12] = {
|
||||
0, 170, 210, 250, 290, 330, 370, 410, 450, 490, 530, 570
|
||||
};
|
||||
static bx_bool statusitem_active[12];
|
||||
#if BX_SHOW_IPS
|
||||
static bx_bool sdl_ips_update = 0;
|
||||
static char sdl_ips_text[20];
|
||||
#endif
|
||||
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define SWAP16(X) (X)
|
||||
@ -1082,6 +1086,12 @@ void bx_sdl_gui_c::handle_events(void)
|
||||
BX_PANIC (("User requested shutdown."));
|
||||
}
|
||||
}
|
||||
#if BX_SHOW_IPS
|
||||
if (sdl_ips_update) {
|
||||
sdl_ips_update = 0;
|
||||
sdl_set_status_text(0, sdl_ips_text, 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -1548,9 +1558,10 @@ 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)
|
||||
{
|
||||
char ips_text[40];
|
||||
sprintf(ips_text, "IPS: %u", ips_count);
|
||||
sdl_set_status_text(0, ips_text, 1);
|
||||
if (!sdl_ips_update) {
|
||||
sprintf(sdl_ips_text, "IPS: %9u", ips_count);
|
||||
sdl_ips_update = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: win32.cc,v 1.101 2006-01-22 18:15:48 sshwarts Exp $
|
||||
// $Id: win32.cc,v 1.102 2006-01-23 18:34:47 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -2059,7 +2059,7 @@ void bx_win32_gui_c::mouse_enabled_changed_specific (bx_bool val)
|
||||
void bx_win32_gui_c::show_ips(Bit32u ips_count)
|
||||
{
|
||||
char ips_text[40];
|
||||
sprintf(ips_text, "IPS: %u", ips_count);
|
||||
sprintf(ips_text, "IPS: %9u", ips_count);
|
||||
SetStatusText(0, ips_text, 0);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// $Id: wx.cc,v 1.79 2006-01-22 18:15:48 sshwarts Exp $
|
||||
// $Id: wx.cc,v 1.80 2006-01-23 18:34:47 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// wxWidgets VGA display for Bochs. wx.cc implements a custom
|
||||
@ -1633,7 +1633,7 @@ bx_wx_gui_c::set_clipboard_text(char *text_snapshot, Bit32u len)
|
||||
void bx_wx_gui_c::show_ips(Bit32u ips_count)
|
||||
{
|
||||
char ips_text[40];
|
||||
sprintf(ips_text, "IPS: %u", ips_count);
|
||||
sprintf(ips_text, "IPS: %9u", ips_count);
|
||||
theFrame->SetStatusText(ips_text, 0);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: x.cc,v 1.99 2006-01-22 18:15:48 sshwarts Exp $
|
||||
// $Id: x.cc,v 1.100 2006-01-23 18:34:47 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -159,6 +159,11 @@ static unsigned bx_statusitem_pos[12] = {
|
||||
static bx_bool bx_statusitem_active[12];
|
||||
static long bx_status_led_green, bx_status_graytext;
|
||||
static char bx_status_info_text[34];
|
||||
#if BX_SHOW_IPS
|
||||
static bx_bool x11_ips_update = 0;
|
||||
static char x11_ips_text[20];
|
||||
static Bit8u x11_mouse_msg_counter = 0;
|
||||
#endif
|
||||
|
||||
static void headerbar_click(int x, int y);
|
||||
static void send_keyboard_mouse_status(void);
|
||||
@ -712,6 +717,9 @@ bx_x_gui_c::mouse_enabled_changed_specific (bx_bool val)
|
||||
enable_cursor();
|
||||
warp_cursor(mouse_enable_x-current_x, mouse_enable_y-current_y);
|
||||
}
|
||||
#if BX_SHOW_IPS
|
||||
x11_mouse_msg_counter = 3;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@ -927,7 +935,13 @@ bx_x_gui_c::handle_events(void)
|
||||
if (mouse_update) {
|
||||
BX_DEBUG(("handle_events(): send mouse status"));
|
||||
send_keyboard_mouse_status();
|
||||
}
|
||||
}
|
||||
#if BX_SHOW_IPS
|
||||
if (x11_ips_update) {
|
||||
x11_ips_update = 0;
|
||||
set_status_text(0, x11_ips_text, 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -1955,12 +1969,19 @@ void bx_x_gui_c::get_capabilities(Bit16u *xres, Bit16u *yres, Bit16u *bpp)
|
||||
#if BX_SHOW_IPS
|
||||
void bx_x_gui_c::show_ips(Bit32u ips_count)
|
||||
{
|
||||
char ips_text[40];
|
||||
sprintf(ips_text, "IPS: %u", ips_count);
|
||||
set_status_text(0, ips_text, 0);
|
||||
if (x11_mouse_msg_counter == 0) {
|
||||
if (!x11_ips_update) {
|
||||
sprintf(x11_ips_text, "IPS: %9u", ips_count);
|
||||
x11_ips_update = 1;
|
||||
}
|
||||
} else {
|
||||
x11_mouse_msg_counter--;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// X11 dialog box functions
|
||||
|
||||
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