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
b94e89da
Commit
b94e89da
authored
Aug 14, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a separate function for parsing the GL version.
parent
a1402e06
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
directx.c
dlls/wined3d/directx.c
+19
-13
No files found.
dlls/wined3d/directx.c
View file @
b94e89da
...
...
@@ -946,6 +946,24 @@ static void fixup_extensions(struct wined3d_gl_info *gl_info, const char *gl_ren
}
}
static
DWORD
wined3d_parse_gl_version
(
const
char
*
gl_version
)
{
const
char
*
ptr
=
gl_version
;
int
major
,
minor
;
major
=
atoi
(
ptr
);
if
(
major
<=
0
)
ERR_
(
d3d_caps
)(
"Invalid opengl major version: %d.
\n
"
,
major
);
while
(
isdigit
(
*
ptr
))
++
ptr
;
if
(
*
ptr
++
!=
'.'
)
ERR_
(
d3d_caps
)(
"Invalid opengl version string: %s.
\n
"
,
debugstr_a
(
gl_version
));
minor
=
atoi
(
ptr
);
TRACE_
(
d3d_caps
)(
"Found OpenGL version: %d.%d.
\n
"
,
major
,
minor
);
return
MAKEDWORD_VERSION
(
major
,
minor
);
}
static
GL_Vendors
wined3d_guess_vendor
(
const
char
*
gl_vendor
,
const
char
*
gl_renderer
)
{
if
(
strstr
(
gl_vendor
,
"NVIDIA"
))
...
...
@@ -1026,19 +1044,7 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_gl_info *gl_info)
HeapFree
(
GetProcessHeap
(),
0
,
gl_renderer
);
return
FALSE
;
}
/* First, parse the generic opengl version. This is supposed not to be
* convoluted with driver specific information. */
gl_string_cursor
=
gl_string
;
major
=
atoi
(
gl_string_cursor
);
if
(
major
<=
0
)
ERR_
(
d3d_caps
)(
"Invalid opengl major version: %d.
\n
"
,
major
);
while
(
*
gl_string_cursor
<=
'9'
&&
*
gl_string_cursor
>=
'0'
)
++
gl_string_cursor
;
if
(
*
gl_string_cursor
++
!=
'.'
)
ERR_
(
d3d_caps
)(
"Invalid opengl version string: %s.
\n
"
,
debugstr_a
(
gl_string
));
minor
=
atoi
(
gl_string_cursor
);
TRACE_
(
d3d_caps
)(
"Found OpenGL version: %d.%d.
\n
"
,
major
,
minor
);
gl_version
=
MAKEDWORD_VERSION
(
major
,
minor
);
gl_version
=
wined3d_parse_gl_version
(
gl_string
);
/* Now parse the driver specific string which we'll report to the app. */
switch
(
gl_info
->
gl_vendor
)
...
...
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