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
ef07c705
Commit
ef07c705
authored
3 months ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Explicitly use the "ANSI" console read/write functions.
Where we use the AsciiChar memory of the returned struct.
parent
97f6ec1c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conio/win32cio.c
+3
-3
3 additions, 3 deletions
src/conio/win32cio.c
with
3 additions
and
3 deletions
src/conio/win32cio.c
+
3
−
3
View file @
ef07c705
...
...
@@ -268,7 +268,7 @@ static int win32_keyboardio(int isgetch)
if
(
lastch
)
continue
;
if
(
!
ReadConsoleInput
(
h
,
&
input
,
1
,
&
num
)
if
(
!
ReadConsoleInput
A
(
h
,
&
input
,
1
,
&
num
)
||
!
num
||
(
input
.
EventType
!=
KEY_EVENT
&&
input
.
EventType
!=
MOUSE_EVENT
&&
input
.
EventType
!=
WINDOW_BUFFER_SIZE_EVENT
))
continue
;
...
...
@@ -827,7 +827,7 @@ int win32_gettext(int left, int top, int right, int bottom, void* buf)
ci
=
(
CHAR_INFO
*
)
alloca
(
sizeof
(
CHAR_INFO
)
*
(
bs
.
X
*
bs
.
Y
));
if
((
h
=
GetStdHandle
(
STD_OUTPUT_HANDLE
))
==
INVALID_HANDLE_VALUE
)
return
0
;
// failure
ReadConsoleOutput
(
h
,
ci
,
bs
,
bc
,
&
reg
);
ReadConsoleOutput
A
(
h
,
ci
,
bs
,
bc
,
&
reg
);
for
(
y
=
0
;
y
<=
(
bottom
-
top
);
y
++
)
{
for
(
x
=
0
;
x
<=
(
right
-
left
);
x
++
)
{
bu
[((
y
*
bs
.
X
)
+
x
)
*
2
]
=
ci
[(
y
*
bs
.
X
)
+
x
].
Char
.
AsciiChar
;
...
...
@@ -887,7 +887,7 @@ int win32_puttext(int left, int top, int right, int bottom, void* buf)
}
}
if
((
h
=
GetStdHandle
(
STD_OUTPUT_HANDLE
))
!=
INVALID_HANDLE_VALUE
)
WriteConsoleOutput
(
h
,
ci
,
bs
,
bc
,
&
reg
);
WriteConsoleOutput
A
(
h
,
ci
,
bs
,
bc
,
&
reg
);
return
1
;
}
...
...
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