Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
969c3bb0
Commit
969c3bb0
authored
2 years ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Call kbwait() before wany uifc.list() we care about the return value of
Fixes high CPU utilization at menus.
parent
b4d3dd21
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Pipeline
#4175
failed
2 years ago
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/syncterm/bbslist.c
+14
-1
14 additions, 1 deletion
src/syncterm/bbslist.c
with
14 additions
and
1 deletion
src/syncterm/bbslist.c
+
14
−
1
View file @
969c3bb0
...
...
@@ -2430,12 +2430,21 @@ done:
return
ret
;
}
static
void
kbwait
(
void
)
{
for
(
int
tc
=
0
;
tc
<
50
;
tc
++
)
{
if
(
kbhit
())
break
;
SLEEP
(
1
);
}
}
/*
* Displays the BBS list and allows edits to user BBS list
* Mode is one of BBSLIST_SELECT or BBSLIST_EDIT
*/
struct
bbslist
*
show_bbslist
(
char
*
current
,
int
connected
)
{
#define BBSLIST_SIZE ((MAX_OPTS + 1) * sizeof(struct bbslist *))
...
...
@@ -2561,6 +2570,7 @@ show_bbslist(char *current, int connected)
uifc
.
list_height
=
listcount
+
5
;
if
(
uifc
.
list_height
>
(
uifc
.
scrn_len
-
4
))
uifc
.
list_height
=
uifc
.
scrn_len
-
4
;
kbwait
();
val
=
uifc
.
list
((
listcount
<
MAX_OPTS
?
WIN_XTR
:
0
)
|
WIN_ACT
|
WIN_INSACT
|
WIN_DELACT
|
WIN_UNGETMOUSE
|
WIN_SAV
|
WIN_ESC
|
WIN_INS
|
WIN_DEL
|
WIN_EDIT
|
WIN_EXTKEYS
|
WIN_DYN
|
WIN_FIXEDHEIGHT
...
...
@@ -2725,6 +2735,8 @@ show_bbslist(char *current, int connected)
free_list
(
&
list
[
0
],
listcount
);
free
(
list
);
return
NULL
;
case
-
2
:
kbwait
();
}
}
else
if
(
val
&
MSK_ON
)
{
...
...
@@ -2994,6 +3006,7 @@ show_bbslist(char *current, int connected)
if
(
oldopt
!=
-
2
)
settitle
(
syncterm_version
);
oldopt
=
-
2
;
kbwait
();
val
=
uifc
.
list
(
WIN_T2B
|
WIN_RHT
|
WIN_EXTKEYS
|
WIN_DYN
|
WIN_UNGETMOUSE
|
WIN_ACT
|
WIN_ESC
,
0
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment