mirror of https://github.com/xzeldon/htop.git
Fix behavior of `htop -d 1`. Closes #72.
This commit is contained in:
parent
78d09f955a
commit
ebd5de37ac
11
CRT.c
11
CRT.c
|
@ -165,9 +165,12 @@ static void CRT_handleSIGTERM(int sgn) {
|
||||||
void CRT_init(int delay, int colorScheme) {
|
void CRT_init(int delay, int colorScheme) {
|
||||||
initscr();
|
initscr();
|
||||||
noecho();
|
noecho();
|
||||||
CRT_delay = delay;
|
CRT_delay = delay/2;
|
||||||
|
if (CRT_delay == 0) {
|
||||||
|
CRT_delay = 1;
|
||||||
|
}
|
||||||
CRT_colorScheme = colorScheme;
|
CRT_colorScheme = colorScheme;
|
||||||
halfdelay(CRT_delay/2);
|
halfdelay(CRT_delay);
|
||||||
nonl();
|
nonl();
|
||||||
intrflush(stdscr, false);
|
intrflush(stdscr, false);
|
||||||
keypad(stdscr, true);
|
keypad(stdscr, true);
|
||||||
|
@ -227,7 +230,7 @@ int CRT_readKey() {
|
||||||
cbreak();
|
cbreak();
|
||||||
nodelay(stdscr, FALSE);
|
nodelay(stdscr, FALSE);
|
||||||
int ret = getch();
|
int ret = getch();
|
||||||
halfdelay(CRT_delay/2);
|
halfdelay(CRT_delay);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +241,7 @@ void CRT_disableDelay() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRT_enableDelay() {
|
void CRT_enableDelay() {
|
||||||
halfdelay(CRT_delay/2);
|
halfdelay(CRT_delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CRT_setColors(int colorScheme) {
|
void CRT_setColors(int colorScheme) {
|
||||||
|
|
Loading…
Reference in New Issue