mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-23 07:15:05 +00:00
This makes more sense here.
This commit is contained in:
3
curses.h
3
curses.h
@@ -28,7 +28,7 @@ Defined by this header:
|
||||
**man-end****************************************************************/
|
||||
|
||||
#define PDCURSES 1 /* PDCurses-only routines */
|
||||
#define PDC_BUILD 3805
|
||||
#define PDC_BUILD 3806
|
||||
#define PDC_VER_MAJOR 3
|
||||
#define PDC_VER_MINOR 8
|
||||
#define PDC_VERDOT "3.8"
|
||||
@@ -357,6 +357,7 @@ typedef struct
|
||||
#endif
|
||||
short line_color; /* color of line attributes - default -1 */
|
||||
attr_t termattrs; /* attribute capabilities */
|
||||
bool dirty; /* redraw on napms() after init_color() */
|
||||
} SCREEN;
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
||||
@@ -47,7 +47,6 @@ extern FILE *pdc_dbfp; /* tracing file pointer (NULL = off) */
|
||||
extern bool pdc_color_started;
|
||||
extern unsigned long pdc_key_modifiers;
|
||||
extern MOUSE_STATUS pdc_mouse_status;
|
||||
extern bool pdc_dirty; /* redraw on napms() after init_color() */
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -181,12 +181,12 @@ int init_color(short color, short red, short green, short blue)
|
||||
{
|
||||
PDC_LOG(("init_color() - called\n"));
|
||||
|
||||
if (color < 0 || color >= COLORS || !PDC_can_change_color() ||
|
||||
if (!SP || color < 0 || color >= COLORS || !PDC_can_change_color() ||
|
||||
red < -1 || red > 1000 || green < -1 || green > 1000 ||
|
||||
blue < -1 || blue > 1000)
|
||||
return ERR;
|
||||
|
||||
pdc_dirty = TRUE;
|
||||
SP->dirty = TRUE;
|
||||
|
||||
return PDC_init_color(color, red, green, blue);
|
||||
}
|
||||
|
||||
@@ -149,6 +149,7 @@ WINDOW *Xinitscr(int argc, char *argv[])
|
||||
SP->linesrippedoffontop = 0;
|
||||
SP->delaytenths = 0;
|
||||
SP->line_color = -1;
|
||||
SP->dirty = FALSE;
|
||||
|
||||
SP->orig_cursor = PDC_get_cursor_mode();
|
||||
|
||||
|
||||
@@ -87,7 +87,6 @@ kernel
|
||||
|
||||
RIPPEDOFFLINE linesripped[5];
|
||||
char linesrippedoff = 0;
|
||||
bool pdc_dirty = FALSE;
|
||||
|
||||
static struct cttyset
|
||||
{
|
||||
@@ -228,9 +227,9 @@ int napms(int ms)
|
||||
if (!SP)
|
||||
return ERR;
|
||||
|
||||
if (pdc_dirty)
|
||||
if (SP->dirty)
|
||||
{
|
||||
pdc_dirty = FALSE;
|
||||
SP->dirty = FALSE;
|
||||
wrefresh(curscr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user