|
@@ -54,13 +54,13 @@ enum maybe_keycode {
|
|
};
|
|
};
|
|
|
|
|
|
static DisplayChangeListener *dcl;
|
|
static DisplayChangeListener *dcl;
|
|
-static console_ch_t screen[160 * 100];
|
|
|
|
|
|
+static console_ch_t *screen;
|
|
static WINDOW *screenpad = NULL;
|
|
static WINDOW *screenpad = NULL;
|
|
static int width, height, gwidth, gheight, invalidate;
|
|
static int width, height, gwidth, gheight, invalidate;
|
|
static int px, py, sminx, sminy, smaxx, smaxy;
|
|
static int px, py, sminx, sminy, smaxx, smaxy;
|
|
|
|
|
|
static const char *font_charset = "CP437";
|
|
static const char *font_charset = "CP437";
|
|
-static cchar_t vga_to_curses[256];
|
|
|
|
|
|
+static cchar_t *vga_to_curses;
|
|
|
|
|
|
static void curses_update(DisplayChangeListener *dcl,
|
|
static void curses_update(DisplayChangeListener *dcl,
|
|
int x, int y, int w, int h)
|
|
int x, int y, int w, int h)
|
|
@@ -405,6 +405,8 @@ static void curses_refresh(DisplayChangeListener *dcl)
|
|
static void curses_atexit(void)
|
|
static void curses_atexit(void)
|
|
{
|
|
{
|
|
endwin();
|
|
endwin();
|
|
|
|
+ g_free(vga_to_curses);
|
|
|
|
+ g_free(screen);
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -783,6 +785,8 @@ static void curses_display_init(DisplayState *ds, DisplayOptions *opts)
|
|
if (opts->u.curses.charset) {
|
|
if (opts->u.curses.charset) {
|
|
font_charset = opts->u.curses.charset;
|
|
font_charset = opts->u.curses.charset;
|
|
}
|
|
}
|
|
|
|
+ screen = g_new0(console_ch_t, 160 * 100);
|
|
|
|
+ vga_to_curses = g_new0(cchar_t, 256);
|
|
curses_setup();
|
|
curses_setup();
|
|
curses_keyboard_setup();
|
|
curses_keyboard_setup();
|
|
atexit(curses_atexit);
|
|
atexit(curses_atexit);
|