summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2008-10-18 16:25:13 (GMT)
committer Jaromil <jaromil@dyne.org>2008-10-18 16:25:13 (GMT)
commitda8d151763b9325f5218900458dd36cb57828135 (patch)
tree78ec979f7fcbdad421e408b068f557b7df742126
parentd58f9438b198fb67b383db74e80ee244cc0ecf7f (diff)
fix in pending_key: cpu usage was 100% in recent s-lang version,
profiling flags in default build
-rw-r--r--Makefile2
-rw-r--r--slw/Makefile2
-rw-r--r--slw/slw_console.cpp10
3 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 37aa3b0..031cf86 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ LINKER = ld
# debugging flags:
-CXXFLAGS = -Wall -ggdb -Islw -I. -I/usr/pkg/include -DHAVE_BSD
+CXXFLAGS = -Wall -ggdb -pg -Islw -I. -I/usr/pkg/include -DHAVE_BSD
# optimized flags:
# CXXFLAGS = -Wall -O2 -fomit-frame-pointer -ffast-math -I../slw -I. -I/usr/pkg/include -DHAVE_BSD
diff --git a/slw/Makefile b/slw/Makefile
index 1a98b1d..7aa9ab0 100644
--- a/slw/Makefile
+++ b/slw/Makefile
@@ -9,7 +9,7 @@ CXX = g++
LINKER = ld
# debugging flags:
-CXXFLAGS = -pipe -Wall -ggdb -I.
+CXXFLAGS = -pipe -Wall -ggdb -pg -I.
# optimized flags:
# CXXFLAGS = -pipe -Wall -O2 -fomit-frame-pointer -ffast-math
diff --git a/slw/slw_console.cpp b/slw/slw_console.cpp
index 0142c4f..9627548 100644
--- a/slw/slw_console.cpp
+++ b/slw/slw_console.cpp
@@ -51,10 +51,10 @@ static void sigint_handler (int sig) {
/* non blocking getkey */
static int getkey_handler() {
unsigned int ch = 0;
- if(SLang_input_pending(0))
- // return SLang_getkey();
+ if(SLang_input_pending(1))
+ // return SLang_getkey();
ch = SLang_getkey();
- if(ch) func("SLang_getkey in getkey_handler detected char %u",ch);
+ if(ch) func("getkey_handler detected char %u",ch);
return ch;
}
@@ -84,7 +84,7 @@ bool SLangConsole::init() {
SLsmg_init_smg(); // screen manager
-// SLutf8_enable(1); // enable UTF8 character set
+ // SLutf8_enable(1); // enable UTF8 character set
// this is a mess ...
screen_size_changed = false;
@@ -209,7 +209,7 @@ bool SLangConsole::refresh() {
if(focused && !keyboard_quit)
if(focused->cursor) {
// SLtt_set_cursor_visibility(1);
- focused->gotoxy( focused->cur_x, focused->cur_y);
+ focused->gotoxy( focused->cur_x, focused->cur_y);
} // else
// SLtt_set_cursor_visibility(0);