Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
ebd5de37
Commit
ebd5de37
authored
Apr 28, 2014
by
Hisham Muhammad
Browse files
Fix behavior of `htop -d 1`. Closes #72.
parent
78d09f95
Changes
1
Hide whitespace changes
Inline
Side-by-side
CRT.c
View file @
ebd5de37
...
...
@@ -165,9 +165,12 @@ static void CRT_handleSIGTERM(int sgn) {
void
CRT_init
(
int
delay
,
int
colorScheme
)
{
initscr
();
noecho
();
CRT_delay
=
delay
;
CRT_delay
=
delay
/
2
;
if
(
CRT_delay
==
0
)
{
CRT_delay
=
1
;
}
CRT_colorScheme
=
colorScheme
;
halfdelay
(
CRT_delay
/
2
);
halfdelay
(
CRT_delay
);
nonl
();
intrflush
(
stdscr
,
false
);
keypad
(
stdscr
,
true
);
...
...
@@ -227,7 +230,7 @@ int CRT_readKey() {
cbreak
();
nodelay
(
stdscr
,
FALSE
);
int
ret
=
getch
();
halfdelay
(
CRT_delay
/
2
);
halfdelay
(
CRT_delay
);
return
ret
;
}
...
...
@@ -238,7 +241,7 @@ void CRT_disableDelay() {
}
void
CRT_enableDelay
()
{
halfdelay
(
CRT_delay
/
2
);
halfdelay
(
CRT_delay
);
}
void
CRT_setColors
(
int
colorScheme
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment