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
27543a45
Commit
27543a45
authored
Apr 20, 2020
by
deuce
Browse files
Translate non-printing input characters using the codepage, don't assume
anything that doesn't print is "fine".
parent
ca208843
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/conio/sdl_con.c
src/conio/sdl_con.c
+7
-1
No files found.
src/conio/sdl_con.c
View file @
27543a45
...
...
@@ -827,8 +827,14 @@ static void sdl_video_event_thread(void *data)
break
;
}
}
if
(
block_text
||
ev
.
key
.
keysym
.
sym
<
0
||
ev
.
key
.
keysym
.
sym
>
128
||
!
isprint
(
ev
.
key
.
keysym
.
sym
))
if
(
block_text
||
ev
.
key
.
keysym
.
sym
<
0
||
ev
.
key
.
keysym
.
sym
>
128
)
{
sdl_add_key
(
sdl_get_char_code
(
ev
.
key
.
keysym
.
sym
,
ev
.
key
.
keysym
.
mod
));
}
else
if
(
!
isprint
(
ev
.
key
.
keysym
.
sym
))
{
uint8_t
ch
=
cpchar_from_unicode_cpoint
(
getcodepage
(),
ev
.
key
.
keysym
.
sym
,
0
);
if
(
ch
)
sdl_add_key
(
ch
);
}
break
;
case
SDL_TEXTINPUT
:
if
(
!
block_text
)
...
...
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