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
c95903d1
Commit
c95903d1
authored
7 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Cursor blink rate is 2x character blink rate.
parent
916d3544
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/conio/bitmap_con.c
+16
-4
16 additions, 4 deletions
src/conio/bitmap_con.c
src/conio/vidmodes.h
+1
-0
1 addition, 0 deletions
src/conio/vidmodes.h
with
17 additions
and
4 deletions
src/conio/bitmap_con.c
+
16
−
4
View file @
c95903d1
...
...
@@ -362,7 +362,7 @@ static BOOL bitmap_draw_cursor(void)
if
(
!
bitmap_initialized
)
return
ret
;
if
(
vstat
.
curs_visible
)
{
if
(
vstat
.
blink
||
(
!
vstat
.
curs_blinks
))
{
if
(
vstat
.
curs_
blink
||
(
!
vstat
.
curs_blinks
))
{
if
(
vstat
.
curs_start
<=
vstat
.
curs_end
)
{
xoffset
=
(
vstat
.
curs_col
-
1
)
*
vstat
.
charwidth
;
yoffset
=
(
vstat
.
curs_row
-
1
)
*
vstat
.
charheight
;
...
...
@@ -608,12 +608,24 @@ static void blinker_thread(void *data)
SLEEP
(
10
);
}
while
(
locked_screen_check
()
==
NULL
);
count
++
;
if
(
count
==
25
)
{
pthread_mutex_lock
(
&
vstatlock
);
if
(
vstat
.
curs_blink
)
vstat
.
curs_blink
=
FALSE
;
else
vstat
.
curs_blink
=
TRUE
;
pthread_mutex_unlock
(
&
vstatlock
);
}
if
(
count
==
50
)
{
pthread_mutex_lock
(
&
vstatlock
);
if
(
vstat
.
blink
)
vstat
.
blink
=
FALSE
;
else
vstat
.
blink
=
TRUE
;
if
(
vstat
.
curs_blink
)
vstat
.
curs_blink
=
FALSE
;
else
vstat
.
curs_blink
=
TRUE
;
count
=
0
;
pthread_mutex_unlock
(
&
vstatlock
);
}
...
...
@@ -624,7 +636,7 @@ static void blinker_thread(void *data)
request_redraw
();
}
else
{
if
(
count
==
0
)
if
(
count
==
0
||
count
==
25
)
if
(
update_from_vmem
(
FALSE
))
request_redraw
();
}
...
...
@@ -697,8 +709,8 @@ static int update_from_vmem(int force)
/* Redraw cursor? */
if
(
vstat
.
curs_visible
// Visible
&&
vstat
.
curs_start
<=
vstat
.
curs_end
// Should be drawn
&&
vstat
.
curs_blinks
// Is blinking
&&
vstat
.
blink
!=
vs
.
blink
)
// Blink has changed
&&
vstat
.
curs_blinks
// Is blinking
&&
vstat
.
curs_
blink
!=
vs
.
curs_
blink
)
// Blink has changed
redraw_cursor
=
1
;
/* Did the meaning of the blink bit change? */
...
...
This diff is collapsed.
Click to expand it.
src/conio/vidmodes.h
+
1
−
0
View file @
c95903d1
...
...
@@ -85,6 +85,7 @@ struct video_stats {
int
charwidth
;
int
bright_background
;
int
blink
;
int
curs_blink
;
int
no_bright
;
int
no_blink
;
int
bright_altcharset
;
...
...
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