Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4a929eaf
Commit
4a929eaf
authored
Dec 15, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Support utf-8 in WM_CHAR W->A conversion.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55655
parent
bd693d67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
message.c
dlls/user32/message.c
+4
-7
No files found.
dlls/user32/message.c
View file @
4a929eaf
...
...
@@ -183,9 +183,9 @@ BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping
*/
static
void
map_wparam_WtoA
(
MSG
*
msg
,
BOOL
remove
)
{
BYTE
ch
[
4
];
BYTE
ch
[
4
]
=
{
0
}
;
WCHAR
wch
[
2
];
DWORD
len
;
DWORD
i
,
len
;
DWORD
cp
;
switch
(
msg
->
message
)
...
...
@@ -195,7 +195,6 @@ static void map_wparam_WtoA( MSG *msg, BOOL remove )
{
cp
=
get_input_codepage
();
wch
[
0
]
=
LOWORD
(
msg
->
wParam
);
ch
[
0
]
=
ch
[
1
]
=
0
;
len
=
WideCharToMultiByte
(
cp
,
0
,
wch
,
1
,
(
LPSTR
)
ch
,
2
,
NULL
,
NULL
);
if
(
len
==
2
)
/* DBCS char */
{
...
...
@@ -224,14 +223,12 @@ static void map_wparam_WtoA( MSG *msg, BOOL remove )
cp
=
get_input_codepage
();
wch
[
0
]
=
LOWORD
(
msg
->
wParam
);
wch
[
1
]
=
HIWORD
(
msg
->
wParam
);
ch
[
0
]
=
ch
[
1
]
=
0
;
WideCharToMultiByte
(
cp
,
0
,
wch
,
2
,
(
LPSTR
)
ch
,
4
,
NULL
,
NULL
);
msg
->
wParam
=
MAKEWPARAM
(
ch
[
0
]
|
(
ch
[
1
]
<<
8
),
0
);
len
=
WideCharToMultiByte
(
cp
,
0
,
wch
,
2
,
(
LPSTR
)
ch
,
4
,
NULL
,
NULL
);
for
(
msg
->
wParam
=
i
=
0
;
i
<
len
;
i
++
)
msg
->
wParam
|=
ch
[
i
]
<<
(
8
*
i
);
break
;
case
WM_IME_CHAR
:
cp
=
get_input_codepage
();
wch
[
0
]
=
LOWORD
(
msg
->
wParam
);
ch
[
0
]
=
ch
[
1
]
=
0
;
len
=
WideCharToMultiByte
(
cp
,
0
,
wch
,
1
,
(
LPSTR
)
ch
,
2
,
NULL
,
NULL
);
if
(
len
==
2
)
msg
->
wParam
=
MAKEWPARAM
(
(
ch
[
0
]
<<
8
)
|
ch
[
1
],
HIWORD
(
msg
->
wParam
)
);
...
...
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