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
1a89cea4
Commit
1a89cea4
authored
May 04, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Avoid using kernel32 functions in get_config_key.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
30d5a04f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+13
-10
No files found.
dlls/winex11.drv/x11drv_main.c
View file @
1a89cea4
...
...
@@ -422,7 +422,7 @@ static inline DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name,
static
void
setup_options
(
void
)
{
static
const
WCHAR
x11driverW
[]
=
{
'\\'
,
'X'
,
'1'
,
'1'
,
' '
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
0
};
WCHAR
buffer
[
MAX_PATH
+
16
];
WCHAR
buffer
[
MAX_PATH
+
16
]
,
*
p
,
*
appname
;
HKEY
hkey
,
appkey
=
0
;
DWORD
len
;
...
...
@@ -431,18 +431,21 @@ static void setup_options(void)
/* open the app-specific key */
len
=
GetModuleFileNameW
(
0
,
buffer
,
MAX_PATH
);
appname
=
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
ImagePathName
.
Buffer
;
if
((
p
=
strrchrW
(
appname
,
'/'
)))
appname
=
p
+
1
;
if
((
p
=
strrchrW
(
appname
,
'\\'
)))
appname
=
p
+
1
;
len
=
lstrlenW
(
appname
);
if
(
len
&&
len
<
MAX_PATH
)
{
HKEY
tmpkey
;
WCHAR
*
p
,
*
appname
=
buffer
;
if
((
p
=
strrchrW
(
appname
,
'/'
)))
appname
=
p
+
1
;
if
((
p
=
strrchrW
(
appname
,
'\\'
)))
appname
=
p
+
1
;
CharLowerW
(
appname
);
len
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
appname
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
((
process_name
=
malloc
(
len
)))
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
appname
,
-
1
,
process_name
,
len
,
NULL
,
NULL
);
strcatW
(
appname
,
x11driverW
);
int
i
;
for
(
i
=
0
;
appname
[
i
];
i
++
)
buffer
[
i
]
=
RtlDowncaseUnicodeChar
(
appname
[
i
]
);
buffer
[
i
]
=
0
;
appname
=
buffer
;
if
((
process_name
=
malloc
(
len
*
3
+
1
)))
ntdll_wcstoumbs
(
appname
,
len
+
1
,
process_name
,
len
*
3
+
1
,
FALSE
);
memcpy
(
appname
+
i
,
x11driverW
,
sizeof
(
x11driverW
)
);
/* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\X11 Driver */
if
((
tmpkey
=
open_hkcu_key
(
"Software
\\
Wine
\\
AppDefaults"
)))
{
...
...
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