- palette_change must return 1 to indicate that a screen update is needed

after the palette changes.  This makes the iodev/vga.cc code do the
  right thing.  This also fixes the toolstar splash screen, but at a
  fraction of the cost of the solution in rev 1.37.
This commit is contained in:
Bryce Denney 2002-10-05 17:45:48 +00:00
parent 7f8482cc93
commit b147067051

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////
// $Id: wx.cc,v 1.38 2002-10-05 17:42:51 bdenney Exp $
// $Id: wx.cc,v 1.39 2002-10-05 17:45:48 bdenney Exp $
/////////////////////////////////////////////////////////////////
//
// wxWindows VGA display for Bochs. wx.cc implements a custom
@ -59,6 +59,9 @@
//////////////////////////////////////////////////////////////
// data for wx gui
//////////////////////////////////////////////////////////////
// The bits to be displayed on the VGA screen are stored in wxScreen.
// wxScreen is an array (size=width*height*3) of RGB values. Each
// pixel is represented by three bytes, one for red, green, and blue.
static char *wxScreen = NULL;
wxCriticalSection wxScreen_lock;
static long wxScreenX = 0;
@ -951,7 +954,7 @@ void bx_gui_c::text_update(Bit8u *old_text, Bit8u *new_text,
// Allocate a color in the native GUI, for this color, and put
// it in the colormap location 'index'.
// returns: 0=no screen update needed (color map change has direct effect)
// 1=screen updated needed (redraw using current colormap)
// 1=screen update needed (redraw using current colormap)
Boolean
bx_gui_c::palette_change(unsigned index, unsigned red, unsigned green, unsigned blue)
@ -960,8 +963,7 @@ bx_gui_c::palette_change(unsigned index, unsigned red, unsigned green, unsigned
wxBochsPalette[index].red = red;
wxBochsPalette[index].green = green;
wxBochsPalette[index].blue = blue;
thePanel->MyRefresh ();
return(0);
return(1); // screen update needed
}