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
02ae22d9
Commit
02ae22d9
authored
Mar 15, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: The current WGL DC should never be NULL in wined3d_adapter_init_gl_caps().
parent
881374ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
37 deletions
+36
-37
directx.c
dlls/wined3d/directx.c
+36
-37
No files found.
dlls/wined3d/directx.c
View file @
02ae22d9
...
...
@@ -2823,49 +2823,48 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
gl_info
->
wrap_lookup
[
WINED3D_TADDRESS_MIRROR_ONCE
-
WINED3D_TADDRESS_WRAP
]
=
gl_info
->
supported
[
ATI_TEXTURE_MIRROR_ONCE
]
?
GL_MIRROR_CLAMP_TO_EDGE_ATI
:
GL_REPEAT
;
/* Make sure there's an active HDC else the WGL extensions will fail */
hdc
=
pwglGetCurrentDC
();
if
(
hdc
)
{
/* Not all GL drivers might offer WGL extensions e.g. VirtualBox */
if
(
GL_EXTCALL
(
wglGetExtensionsStringARB
))
WGL_Extensions
=
GL_EXTCALL
(
wglGetExtensionsStringARB
(
hdc
));
if
(
!
WGL_Extensions
)
{
ERR
(
" WGL_Extensions returns NULL
\n
"
);
}
else
/* Not all GL drivers might offer WGL extensions e.g. VirtualBox. */
if
(
GL_EXTCALL
(
wglGetExtensionsStringARB
))
WGL_Extensions
=
GL_EXTCALL
(
wglGetExtensionsStringARB
(
hdc
));
if
(
!
WGL_Extensions
)
WARN_
(
d3d_caps
)(
"WGL extensions not supported.
\n
"
);
else
{
TRACE_
(
d3d_caps
)(
"WGL_Extensions reported:
\n
"
);
while
(
*
WGL_Extensions
)
{
TRACE_
(
d3d_caps
)(
"WGL_Extensions reported:
\n
"
);
while
(
*
WGL_Extensions
)
{
const
char
*
Start
;
char
ThisExtn
[
256
];
const
char
*
start
;
char
current_ext
[
256
];
while
(
isspace
(
*
WGL_Extensions
))
WGL_Extensions
++
;
Start
=
WGL_Extensions
;
while
(
!
isspace
(
*
WGL_Extensions
)
&&
*
WGL_Extensions
)
++
WGL_Extensions
;
while
(
isspace
(
*
WGL_Extensions
))
++
WGL_Extensions
;
start
=
WGL_Extensions
;
while
(
!
isspace
(
*
WGL_Extensions
)
&&
*
WGL_Extensions
)
++
WGL_Extensions
;
len
=
WGL_Extensions
-
S
tart
;
if
(
!
len
||
len
>=
sizeof
(
ThisExtn
))
continue
;
len
=
WGL_Extensions
-
s
tart
;
if
(
!
len
||
len
>=
sizeof
(
current_ext
))
continue
;
memcpy
(
ThisExtn
,
S
tart
,
len
);
ThisExtn
[
len
]
=
'\0'
;
TRACE_
(
d3d_caps
)(
"- %s
\n
"
,
debugstr_a
(
ThisExtn
));
memcpy
(
current_ext
,
s
tart
,
len
);
current_ext
[
len
]
=
'\0'
;
TRACE_
(
d3d_caps
)(
"- %s
\n
"
,
debugstr_a
(
current_ext
));
if
(
!
strcmp
(
ThisExtn
,
"WGL_ARB_pixel_format"
))
{
gl_info
->
supported
[
WGL_ARB_PIXEL_FORMAT
]
=
TRUE
;
TRACE_
(
d3d_caps
)(
"FOUND: WGL_ARB_pixel_format support
\n
"
);
}
if
(
!
strcmp
(
ThisExtn
,
"WGL_EXT_swap_control"
))
{
gl_info
->
supported
[
WGL_EXT_SWAP_CONTROL
]
=
TRUE
;
TRACE_
(
d3d_caps
)(
"FOUND: WGL_EXT_swap_control support
\n
"
);
}
if
(
!
strcmp
(
ThisExtn
,
"WGL_WINE_pixel_format_passthrough"
))
{
gl_info
->
supported
[
WGL_WINE_PIXEL_FORMAT_PASSTHROUGH
]
=
TRUE
;
TRACE_
(
d3d_caps
)(
"FOUND: WGL_WINE_pixel_format_passthrough support
\n
"
);
}
if
(
!
strcmp
(
current_ext
,
"WGL_ARB_pixel_format"
))
{
gl_info
->
supported
[
WGL_ARB_PIXEL_FORMAT
]
=
TRUE
;
TRACE_
(
d3d_caps
)(
"FOUND: WGL_ARB_pixel_format support
\n
"
);
}
if
(
!
strcmp
(
current_ext
,
"WGL_EXT_swap_control"
))
{
gl_info
->
supported
[
WGL_EXT_SWAP_CONTROL
]
=
TRUE
;
TRACE_
(
d3d_caps
)(
"FOUND: WGL_EXT_swap_control support
\n
"
);
}
if
(
!
strcmp
(
current_ext
,
"WGL_WINE_pixel_format_passthrough"
))
{
gl_info
->
supported
[
WGL_WINE_PIXEL_FORMAT_PASSTHROUGH
]
=
TRUE
;
TRACE_
(
d3d_caps
)(
"FOUND: WGL_WINE_pixel_format_passthrough support
\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