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
b4f0adbf
Commit
b4f0adbf
authored
Dec 02, 2006
by
Chris Robinson
Committed by
Alexandre Julliard
Dec 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wgl: Don't return prematurely if ConvertPixelFormatWGLtoGLX receives an invalid pixel format.
parent
12e4aa21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
opengl.c
dlls/winex11.drv/opengl.c
+10
-4
No files found.
dlls/winex11.drv/opengl.c
View file @
b4f0adbf
...
...
@@ -876,20 +876,26 @@ static BOOL init_formats(Display *display, int screen, Visual *visual)
*/
static
BOOL
ConvertPixelFormatWGLtoGLX
(
Display
*
display
,
int
iPixelFormat
,
int
*
fmt_index
,
int
*
fmt_count
)
{
int
ret
;
/* Init the list of pixel formats when we need it */
if
(
!
WineGLPixelFormatListSize
)
init_formats
(
display
,
DefaultScreen
(
display
),
visual
);
if
((
iPixelFormat
<=
0
)
||
(
iPixelFormat
>
WineGLPixelFormatListSize
))
{
ERR
(
"invalid iPixelFormat %d
\n
"
,
iPixelFormat
);
return
FALSE
;
ret
=
FALSE
;
*
fmt_index
=
-
1
;
}
else
{
ret
=
TRUE
;
*
fmt_index
=
WineGLPixelFormatList
[
iPixelFormat
-
1
].
fmt_index
;
}
*
fmt_index
=
WineGLPixelFormatList
[
iPixelFormat
-
1
].
fmt_index
;
*
fmt_count
=
WineGLPixelFormatListSize
;
TRACE
(
"Returning fmt_index=%d, fmt_count=%d for iPixelFormat=%d
\n
"
,
*
fmt_index
,
*
fmt_count
,
iPixelFormat
);
return
TRUE
;
return
ret
;
}
/* Search our internal pixelformat list for the WGL format corresponding to the given fbconfig */
...
...
@@ -2272,7 +2278,7 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelF
* We don't have to fail yet as a program can specify an invaled iPixelFormat (lets say 0) if it wants to query
* the number of supported WGL formats. Whether the iPixelFormat is valid is handled in the for-loop below. */
if
(
!
ConvertPixelFormatWGLtoGLX
(
gdi_display
,
iPixelFormat
,
&
fmt_index
,
&
nWGLFormats
))
{
ERR
(
"Unable to convert iPixelFormat %d to a GLX one, expect problems
!
\n
"
,
iPixelFormat
);
WARN
(
"Unable to convert iPixelFormat %d to a GLX one
!
\n
"
,
iPixelFormat
);
}
for
(
i
=
0
;
i
<
nAttributes
;
++
i
)
{
...
...
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