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
b349aa67
Commit
b349aa67
authored
Jun 26, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Add a helper function to correctly compare extension strings.
parent
a384fbee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
wgl.c
dlls/opengl32/wgl.c
+16
-2
No files found.
dlls/opengl32/wgl.c
View file @
b349aa67
...
...
@@ -393,6 +393,20 @@ int WINAPI wglGetLayerPaletteEntries(HDC hdc,
return
0
;
}
/* check if the extension is present in the list */
static
BOOL
has_extension
(
const
char
*
list
,
const
char
*
ext
)
{
size_t
len
=
strlen
(
ext
);
while
(
list
)
{
while
(
*
list
==
' '
)
list
++
;
if
(
!
strncmp
(
list
,
ext
,
len
)
&&
(
!
list
[
len
]
||
list
[
len
]
==
' '
))
return
TRUE
;
list
=
strchr
(
list
,
' '
);
}
return
FALSE
;
}
static
int
compar
(
const
void
*
elt_a
,
const
void
*
elt_b
)
{
return
strcmp
(((
const
OpenGL_extension
*
)
elt_a
)
->
name
,
((
const
OpenGL_extension
*
)
elt_b
)
->
name
);
...
...
@@ -417,7 +431,7 @@ static BOOL is_extension_supported(const char* extension)
* if the OpenGL extension required for the function we are looking up is supported. */
/* Check if the extension is part of the GL extension string to see if it is supported. */
if
(
strstr
(
gl_ext_string
,
extension
)
!=
NULL
)
if
(
has_extension
(
gl_ext_string
,
extension
)
)
return
TRUE
;
/* In general an OpenGL function starts as an ARB/EXT extension and at some stage
...
...
@@ -1028,7 +1042,7 @@ const GLubyte * WINAPI wine_glGetString( GLenum name )
TRACE
(
"- %s:"
,
ThisExtn
);
/* test if supported API is disabled by config */
if
(
!
internal_gl_disabled_extensions
||
!
strstr
(
internal_gl_disabled_extensions
,
ThisExtn
))
{
if
(
!
has_extension
(
internal_gl_disabled_extensions
,
ThisExtn
))
{
strcat
(
internal_gl_extensions
,
" "
);
strcat
(
internal_gl_extensions
,
ThisExtn
);
TRACE
(
" active
\n
"
);
...
...
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