summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libunix.cc
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-11-21 01:12:59 -0600
committerJesse Luehrs <doy@tozt.net>2009-11-21 01:24:28 -0600
commit5ea2782c48d0aac41586e80b76571d9bdcd25699 (patch)
tree86f00063fca37928e889b654a2ee7c1620be4321 /crawl-ref/source/libunix.cc
parent1e40dff21f476d76f2cab436661a077b65fee2cb (diff)
downloadcrawl-ref-5ea2782c48d0aac41586e80b76571d9bdcd25699.tar.gz
crawl-ref-5ea2782c48d0aac41586e80b76571d9bdcd25699.zip
only refresh when actually necessary
Diffstat (limited to 'crawl-ref/source/libunix.cc')
-rw-r--r--crawl-ref/source/libunix.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc
index 4c4ce8c952..d76e3934cf 100644
--- a/crawl-ref/source/libunix.cc
+++ b/crawl-ref/source/libunix.cc
@@ -415,6 +415,7 @@ void clear_message_window()
{
(void)wattrset( Message_Window, curs_fg_attr(LIGHTGREY) );
werase( Message_Window );
+ refresh();
wrefresh( Message_Window );
}
@@ -447,6 +448,7 @@ void message_out(int which_line, int color, const char *s, int firstcol,
move(y + crawl_view.msgp.y - 1, crawl_view.msgp.x - 1 + x);
}
+ refresh();
wrefresh(Message_Window);
}
@@ -670,7 +672,6 @@ int cprintf(const char *format,...)
vsprintf(buffer, format, argp);
va_end(argp);
i = waddstr_with_altcharset(stdscr, buffer);
- refresh();
return (i);
}
@@ -742,7 +743,6 @@ char getche()
chr = getch();
addch(chr);
- refresh();
return (chr);
}
@@ -750,7 +750,7 @@ char getche()
int window(int x1, int y1, int x2, int y2)
{
x1 = y1 = x2 = y2 = 0; /* Do something to them.. makes gcc happy :) */
- return (refresh());
+ return OK;
}
void put_colour_ch(int colour, unsigned ch)
@@ -806,7 +806,6 @@ void puttext(int x1, int y1, int x2, int y2, const screen_buffer_t *buf)
// C++ string class. -- bwr
void update_screen(void)
{
- refresh();
}
void clear_to_end_of_line(void)
@@ -851,9 +850,7 @@ int clrscr()
textcolor( LIGHTGREY );
textbackground( BLACK );
retval = clear();
-#ifndef DGAMELAUNCH
- refresh();
-#else
+#ifdef DGAMELAUNCH
printf("%s", DGL_CLEAR_SCREEN);
fflush(stdout);
#endif
@@ -1127,6 +1124,7 @@ int wherey()
void delay( unsigned long time )
{
+ refresh();
usleep( time * 1000 );
}