Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
d10dcf2c
Commit
d10dcf2c
authored
Sep 25, 2019
by
deuce
Browse files
Handle loadfont() setting font to -1.
parent
bbf2f9f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
src/conio/bitmap_con.c
src/conio/bitmap_con.c
+17
-13
No files found.
src/conio/bitmap_con.c
View file @
d10dcf2c
...
...
@@ -535,19 +535,23 @@ static int bitmap_draw_one_char(unsigned int xpos, unsigned int ypos)
fg
=
vmem_ptr
->
vmem
[(
ypos
-
1
)
*
cio_textinfo
.
screenwidth
+
(
xpos
-
1
)].
fg
;
bg
=
vmem_ptr
->
vmem
[(
ypos
-
1
)
*
cio_textinfo
.
screenwidth
+
(
xpos
-
1
)].
bg
;
switch
(
vstat
.
charheight
)
{
case
8
:
this_font
=
(
unsigned
char
*
)
conio_fontdata
[
vmem_ptr
->
vmem
[(
ypos
-
1
)
*
cio_textinfo
.
screenwidth
+
(
xpos
-
1
)].
font
].
eight_by_eight
;
break
;
case
14
:
this_font
=
(
unsigned
char
*
)
conio_fontdata
[
vmem_ptr
->
vmem
[(
ypos
-
1
)
*
cio_textinfo
.
screenwidth
+
(
xpos
-
1
)].
font
].
eight_by_fourteen
;
break
;
case
16
:
this_font
=
(
unsigned
char
*
)
conio_fontdata
[
vmem_ptr
->
vmem
[(
ypos
-
1
)
*
cio_textinfo
.
screenwidth
+
(
xpos
-
1
)].
font
].
eight_by_sixteen
;
break
;
default:
pthread_mutex_unlock
(
&
screen
.
screenlock
);
return
(
-
1
);
if
(
current_font
[
0
]
==
-
1
)
this_font
=
font
[
0
];
else
{
switch
(
vstat
.
charheight
)
{
case
8
:
this_font
=
(
unsigned
char
*
)
conio_fontdata
[
vmem_ptr
->
vmem
[(
ypos
-
1
)
*
cio_textinfo
.
screenwidth
+
(
xpos
-
1
)].
font
].
eight_by_eight
;
break
;
case
14
:
this_font
=
(
unsigned
char
*
)
conio_fontdata
[
vmem_ptr
->
vmem
[(
ypos
-
1
)
*
cio_textinfo
.
screenwidth
+
(
xpos
-
1
)].
font
].
eight_by_fourteen
;
break
;
case
16
:
this_font
=
(
unsigned
char
*
)
conio_fontdata
[
vmem_ptr
->
vmem
[(
ypos
-
1
)
*
cio_textinfo
.
screenwidth
+
(
xpos
-
1
)].
font
].
eight_by_sixteen
;
break
;
default:
pthread_mutex_unlock
(
&
screen
.
screenlock
);
return
(
-
1
);
}
}
if
(
this_font
==
NULL
)
this_font
=
font
[
0
];
...
...
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