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
096757c3
Commit
096757c3
authored
May 03, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Remove redundant code in ChoosePixelFormat.
parent
416e79f3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
78 deletions
+26
-78
opengl.c
dlls/winex11.drv/opengl.c
+26
-78
No files found.
dlls/winex11.drv/opengl.c
View file @
096757c3
...
...
@@ -1291,17 +1291,8 @@ int X11DRV_ChoosePixelFormat(PHYSDEV dev, const PIXELFORMATDESCRIPTOR *ppfd)
if
(
!
(
ppfd
->
dwFlags
&
PFD_DOUBLEBUFFER_DONTCARE
)
)
{
if
(
((
ppfd
->
dwFlags
&
PFD_DOUBLEBUFFER
)
!=
bestDBuffer
)
&&
((
dwFlags
&
PFD_DOUBLEBUFFER
)
==
(
ppfd
->
dwFlags
&
PFD_DOUBLEBUFFER
))
)
{
bestDBuffer
=
dwFlags
&
PFD_DOUBLEBUFFER
;
bestStereo
=
dwFlags
&
PFD_STEREO
;
bestAlpha
=
alpha
;
bestColor
=
color
;
bestDepth
=
depth
;
bestStencil
=
stencil
;
bestAux
=
aux
;
bestFormat
=
i
;
continue
;
}
goto
found
;
if
(
bestDBuffer
!=
-
1
&&
(
dwFlags
&
PFD_DOUBLEBUFFER
)
!=
bestDBuffer
)
continue
;
}
...
...
@@ -1310,17 +1301,8 @@ int X11DRV_ChoosePixelFormat(PHYSDEV dev, const PIXELFORMATDESCRIPTOR *ppfd)
if
(
!
(
ppfd
->
dwFlags
&
PFD_STEREO_DONTCARE
)
)
{
if
(
((
ppfd
->
dwFlags
&
PFD_STEREO
)
!=
bestStereo
)
&&
((
dwFlags
&
PFD_STEREO
)
==
(
ppfd
->
dwFlags
&
PFD_STEREO
))
)
{
bestDBuffer
=
dwFlags
&
PFD_DOUBLEBUFFER
;
bestStereo
=
dwFlags
&
PFD_STEREO
;
bestAlpha
=
alpha
;
bestColor
=
color
;
bestDepth
=
depth
;
bestStencil
=
stencil
;
bestAux
=
aux
;
bestFormat
=
i
;
continue
;
}
goto
found
;
if
(
bestStereo
!=
-
1
&&
(
dwFlags
&
PFD_STEREO
)
!=
bestStereo
)
continue
;
}
...
...
@@ -1333,91 +1315,63 @@ int X11DRV_ChoosePixelFormat(PHYSDEV dev, const PIXELFORMATDESCRIPTOR *ppfd)
* like cColorBits, cAlphaBits and friends if they are set to 0, so they are considered
* as DONTCARE. At least Serious Sam TSE relies on this behavior. */
/* Color bits */
if
(
ppfd
->
cColorBits
)
{
if
(
((
ppfd
->
cColorBits
>
bestColor
)
&&
(
color
>
bestColor
))
||
((
color
>=
ppfd
->
cColorBits
)
&&
(
color
<
bestColor
))
)
{
bestDBuffer
=
dwFlags
&
PFD_DOUBLEBUFFER
;
bestStereo
=
dwFlags
&
PFD_STEREO
;
bestAlpha
=
alpha
;
bestColor
=
color
;
bestDepth
=
depth
;
bestStencil
=
stencil
;
bestAux
=
aux
;
bestFormat
=
i
;
continue
;
}
else
if
(
bestColor
!=
color
)
{
/* Do further checks if the format is compatible */
goto
found
;
if
(
bestColor
!=
color
)
{
/* Do further checks if the format is compatible */
TRACE
(
"color mismatch for iPixelFormat=%d
\n
"
,
i
+
1
);
continue
;
}
}
/* Alpha bits */
if
(
ppfd
->
cAlphaBits
)
{
if
(
((
ppfd
->
cAlphaBits
>
bestAlpha
)
&&
(
alpha
>
bestAlpha
))
||
((
alpha
>=
ppfd
->
cAlphaBits
)
&&
(
alpha
<
bestAlpha
))
)
{
bestDBuffer
=
dwFlags
&
PFD_DOUBLEBUFFER
;
bestStereo
=
dwFlags
&
PFD_STEREO
;
bestAlpha
=
alpha
;
bestColor
=
color
;
bestDepth
=
depth
;
bestStencil
=
stencil
;
bestAux
=
aux
;
bestFormat
=
i
;
continue
;
}
else
if
(
bestAlpha
!=
alpha
)
{
goto
found
;
if
(
bestAlpha
!=
alpha
)
{
TRACE
(
"alpha mismatch for iPixelFormat=%d
\n
"
,
i
+
1
);
continue
;
}
}
/* Depth bits */
if
(
ppfd
->
cDepthBits
)
{
if
(
((
ppfd
->
cDepthBits
>
bestDepth
)
&&
(
depth
>
bestDepth
))
||
((
depth
>=
ppfd
->
cDepthBits
)
&&
(
depth
<
bestDepth
))
)
{
bestDBuffer
=
dwFlags
&
PFD_DOUBLEBUFFER
;
bestStereo
=
dwFlags
&
PFD_STEREO
;
bestAlpha
=
alpha
;
bestColor
=
color
;
bestDepth
=
depth
;
bestStencil
=
stencil
;
bestAux
=
aux
;
bestFormat
=
i
;
continue
;
}
else
if
(
bestDepth
!=
depth
)
{
goto
found
;
if
(
bestDepth
!=
depth
)
{
TRACE
(
"depth mismatch for iPixelFormat=%d
\n
"
,
i
+
1
);
continue
;
}
}
/* Stencil bits */
if
(
ppfd
->
cStencilBits
)
{
if
(
((
ppfd
->
cStencilBits
>
bestStencil
)
&&
(
stencil
>
bestStencil
))
||
((
stencil
>=
ppfd
->
cStencilBits
)
&&
(
stencil
<
bestStencil
))
)
{
bestDBuffer
=
dwFlags
&
PFD_DOUBLEBUFFER
;
bestStereo
=
dwFlags
&
PFD_STEREO
;
bestAlpha
=
alpha
;
bestColor
=
color
;
bestDepth
=
depth
;
bestStencil
=
stencil
;
bestAux
=
aux
;
bestFormat
=
i
;
continue
;
}
else
if
(
bestStencil
!=
stencil
)
{
goto
found
;
if
(
bestStencil
!=
stencil
)
{
TRACE
(
"stencil mismatch for iPixelFormat=%d
\n
"
,
i
+
1
);
continue
;
}
}
/* Aux buffers */
if
(
ppfd
->
cAuxBuffers
)
{
if
(
((
ppfd
->
cAuxBuffers
>
bestAux
)
&&
(
aux
>
bestAux
))
||
((
aux
>=
ppfd
->
cAuxBuffers
)
&&
(
aux
<
bestAux
))
)
{
goto
found
;
if
(
bestAux
!=
aux
)
{
TRACE
(
"aux mismatch for iPixelFormat=%d
\n
"
,
i
+
1
);
continue
;
}
}
continue
;
found:
bestDBuffer
=
dwFlags
&
PFD_DOUBLEBUFFER
;
bestStereo
=
dwFlags
&
PFD_STEREO
;
bestAlpha
=
alpha
;
...
...
@@ -1426,12 +1380,6 @@ int X11DRV_ChoosePixelFormat(PHYSDEV dev, const PIXELFORMATDESCRIPTOR *ppfd)
bestStencil
=
stencil
;
bestAux
=
aux
;
bestFormat
=
i
;
continue
;
}
else
if
(
bestAux
!=
aux
)
{
TRACE
(
"aux mismatch for iPixelFormat=%d
\n
"
,
i
+
1
);
continue
;
}
}
}
if
(
bestFormat
==
-
1
)
{
...
...
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