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
6034b674
Commit
6034b674
authored
6 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Have save/restorescreen() save and restore the flags and fonts as well.
parent
5a5a23a8
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/ciolib.c
+8
-0
8 additions, 0 deletions
src/conio/ciolib.c
src/conio/ciolib.h
+2
-0
2 additions, 0 deletions
src/conio/ciolib.h
with
10 additions
and
0 deletions
src/conio/ciolib.c
+
8
−
0
View file @
6034b674
...
...
@@ -1827,6 +1827,7 @@ CIOLIBEXPORT struct ciolib_screen * CIOLIBCALL ciolib_savescreen(void)
{
struct
ciolib_screen
*
ret
;
int
vmode
;
int
i
;
CIOLIB_INIT
();
...
...
@@ -1861,6 +1862,9 @@ CIOLIBEXPORT struct ciolib_screen * CIOLIBCALL ciolib_savescreen(void)
ciolib_vmem_gettext
(
1
,
1
,
ret
->
text_info
.
screenwidth
,
ret
->
text_info
.
screenheight
,
ret
->
vmem
);
ret
->
fg_colour
=
ciolib_fg
;
ret
->
bg_colour
=
ciolib_bg
;
for
(
i
=
0
;
i
<
5
;
i
++
)
ret
->
fonts
[
i
]
=
ciolib_getfont
(
i
);
ret
->
flags
=
ciolib_getvideoflags
();
return
ret
;
}
...
...
@@ -1882,6 +1886,7 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_restorescreen(struct ciolib_screen *scrn)
{
struct
text_info
ti
;
int
vmode
;
int
i
;
CIOLIB_INIT
();
...
...
@@ -1895,6 +1900,9 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_restorescreen(struct ciolib_screen *scrn)
vmode
=
find_vmode
(
scrn
->
text_info
.
currmode
);
if
(
vmode
!=
-
1
)
ciolib_setpixels
(
0
,
0
,
vparams
[
vmode
].
charwidth
*
vparams
[
vmode
].
cols
-
1
,
vparams
[
vmode
].
charheight
*
vparams
[
vmode
].
rows
-
1
,
0
,
0
,
scrn
->
pixels
,
NULL
);
for
(
i
=
0
;
i
<
5
;
i
++
)
ciolib_setfont
(
scrn
->
fonts
[
i
],
FALSE
,
i
);
ciolib_setvideoflags
(
scrn
->
flags
);
ciolib_setcolour
(
scrn
->
fg_colour
,
scrn
->
bg_colour
);
ciolib_gotoxy
(
scrn
->
text_info
.
curx
,
scrn
->
text_info
.
cury
);
return
1
;
...
...
This diff is collapsed.
Click to expand it.
src/conio/ciolib.h
+
2
−
0
View file @
6034b674
...
...
@@ -261,6 +261,8 @@ struct ciolib_pixels {
struct
ciolib_screen
{
uint32_t
fg_colour
;
uint32_t
bg_colour
;
int
flags
;
int
fonts
[
5
];
struct
ciolib_pixels
*
pixels
;
void
*
vmem
;
uint32_t
*
foreground
;
...
...
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