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
e0378225
Commit
e0378225
authored
Nov 12, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Fix parsing of the DisabledExtensions option.
parent
3efc0fbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
unix_wgl.c
dlls/opengl32/unix_wgl.c
+15
-7
No files found.
dlls/opengl32/unix_wgl.c
View file @
e0378225
...
...
@@ -234,6 +234,11 @@ static inline UINT asciiz_to_unicode( WCHAR *dst, const char *src )
return
(
p
-
dst
)
*
sizeof
(
WCHAR
);
}
static
inline
void
unicode_to_ascii
(
char
*
dst
,
const
WCHAR
*
src
,
size_t
len
)
{
while
(
len
--
)
*
dst
++
=
*
src
++
;
}
static
HKEY
reg_open_key
(
HKEY
root
,
const
WCHAR
*
name
,
ULONG
name_len
)
{
UNICODE_STRING
nameW
=
{
name_len
,
name_len
,
(
WCHAR
*
)
name
};
...
...
@@ -281,16 +286,12 @@ static HKEY open_hkcu_key( const char *name )
return
reg_open_key
(
hkcu
,
bufferW
,
asciiz_to_unicode
(
bufferW
,
name
)
-
sizeof
(
WCHAR
)
);
}
static
ULONG
query_reg_value
(
HKEY
hkey
,
const
WCHAR
*
name
,
KEY_VALUE_PARTIAL_INFORMATION
*
info
,
ULONG
size
)
static
NTSTATUS
query_reg_value
(
HKEY
hkey
,
const
WCHAR
*
name
,
KEY_VALUE_PARTIAL_INFORMATION
*
info
,
ULONG
size
)
{
unsigned
int
name_size
=
name
?
lstrlenW
(
name
)
*
sizeof
(
WCHAR
)
:
0
;
UNICODE_STRING
nameW
=
{
name_size
,
name_size
,
(
WCHAR
*
)
name
};
if
(
NtQueryValueKey
(
hkey
,
&
nameW
,
KeyValuePartialInformation
,
info
,
size
,
&
size
))
return
0
;
return
size
-
FIELD_OFFSET
(
KEY_VALUE_PARTIAL_INFORMATION
,
Data
);
return
NtQueryValueKey
(
hkey
,
&
nameW
,
KeyValuePartialInformation
,
info
,
size
,
&
size
);
}
/* build the extension string by filtering out the disabled extensions */
...
...
@@ -310,7 +311,14 @@ static BOOL filter_extensions( const char *extensions, GLubyte **exts_list, GLui
KEY_VALUE_PARTIAL_INFORMATION
*
value
=
(
void
*
)
buffer
;
static
WCHAR
disabled_extensionsW
[]
=
{
'D'
,
'i'
,
's'
,
'a'
,
'b'
,
'l'
,
'e'
,
'd'
,
'E'
,
'x'
,
't'
,
'e'
,
'n'
,
's'
,
'i'
,
'o'
,
'n'
,
's'
,
0
};
if
(
query_reg_value
(
hkey
,
disabled_extensionsW
,
value
,
sizeof
(
buffer
)
))
str
=
strdup
(
buffer
);
if
(
!
query_reg_value
(
hkey
,
disabled_extensionsW
,
value
,
sizeof
(
buffer
)
))
{
ULONG
len
=
value
->
DataLength
/
sizeof
(
WCHAR
);
unicode_to_ascii
(
buffer
,
(
WCHAR
*
)
value
->
Data
,
len
);
buffer
[
len
]
=
0
;
str
=
strdup
(
buffer
);
}
NtClose
(
hkey
);
}
if
(
str
)
...
...
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