- exit method does nothing unless specific_init was done
This commit is contained in:
parent
a774fc7df5
commit
7ebce64e8d
@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// $Id: x.cc,v 1.60 2003-01-18 12:05:46 vruppert Exp $
|
// $Id: x.cc,v 1.61 2003-01-30 18:41:00 cbothamy Exp $
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||||
@ -109,6 +109,8 @@ static void enable_cursor();
|
|||||||
|
|
||||||
static Bit32u convertStringToXKeysym (const char *string);
|
static Bit32u convertStringToXKeysym (const char *string);
|
||||||
|
|
||||||
|
static bx_bool x_init_done = false;
|
||||||
|
|
||||||
static Pixmap vgafont[256];
|
static Pixmap vgafont[256];
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
@ -576,6 +578,8 @@ bx_x_gui_c::specific_init(int argc, char **argv, unsigned tilewidth, unsigned ti
|
|||||||
BX_PANIC(("vga_x: bits_per_pixel < depth ?"));
|
BX_PANIC(("vga_x: bits_per_pixel < depth ?"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
x_init_done = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
curr_background = 0;
|
curr_background = 0;
|
||||||
@ -1419,6 +1423,8 @@ headerbar_click(int x, int y)
|
|||||||
void
|
void
|
||||||
bx_x_gui_c::exit(void)
|
bx_x_gui_c::exit(void)
|
||||||
{
|
{
|
||||||
|
if (!x_init_done) return;
|
||||||
|
|
||||||
// Delete the font bitmaps
|
// Delete the font bitmaps
|
||||||
for (int i=0; i<256; i++) {
|
for (int i=0; i<256; i++) {
|
||||||
//if (vgafont[i] != NULL)
|
//if (vgafont[i] != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user