Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bfa3c956
Commit
bfa3c956
authored
Feb 24, 2021
by
Paul Gofman
Committed by
Alexandre Julliard
Mar 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Factor out describe_pixel_format() function.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7d2fb577
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
opengl.c
dlls/winex11.drv/opengl.c
+24
-13
No files found.
dlls/winex11.drv/opengl.c
View file @
bfa3c956
...
...
@@ -1533,8 +1533,7 @@ void destroy_gl_drawable( HWND hwnd )
*
* Get the pixel-format descriptor associated to the given id
*/
static
int
WINAPI
glxdrv_wglDescribePixelFormat
(
HDC
hdc
,
int
iPixelFormat
,
UINT
nBytes
,
PIXELFORMATDESCRIPTOR
*
ppfd
)
static
int
WINAPI
describe_pixel_format
(
int
iPixelFormat
,
PIXELFORMATDESCRIPTOR
*
ppfd
,
BOOL
allow_offscreen
)
{
/*XVisualInfo *vis;*/
int
value
;
...
...
@@ -1543,23 +1542,13 @@ static int WINAPI glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat,
if
(
!
has_opengl
())
return
0
;
TRACE
(
"(%p,%d,%d,%p)
\n
"
,
hdc
,
iPixelFormat
,
nBytes
,
ppfd
);
if
(
!
ppfd
)
return
nb_onscreen_formats
;
/* Look for the iPixelFormat in our list of supported formats. If it is supported we get the index in the FBConfig table and the number of supported formats back */
fmt
=
get_pixel_format
(
gdi_display
,
iPixelFormat
,
FALSE
/* Offscreen */
);
fmt
=
get_pixel_format
(
gdi_display
,
iPixelFormat
,
allow_offscreen
);
if
(
!
fmt
)
{
WARN
(
"unexpected format %d
\n
"
,
iPixelFormat
);
return
0
;
}
if
(
nBytes
<
sizeof
(
PIXELFORMATDESCRIPTOR
))
{
ERR
(
"Wrong structure size !
\n
"
);
/* Should set error */
return
0
;
}
memset
(
ppfd
,
0
,
sizeof
(
PIXELFORMATDESCRIPTOR
));
ppfd
->
nSize
=
sizeof
(
PIXELFORMATDESCRIPTOR
);
ppfd
->
nVersion
=
1
;
...
...
@@ -1662,6 +1651,28 @@ static int WINAPI glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat,
return
nb_onscreen_formats
;
}
/**
* glxdrv_DescribePixelFormat
*
* Get the pixel-format descriptor associated to the given id
*/
static
int
WINAPI
glxdrv_wglDescribePixelFormat
(
HDC
hdc
,
int
iPixelFormat
,
UINT
nBytes
,
PIXELFORMATDESCRIPTOR
*
ppfd
)
{
TRACE
(
"(%p,%d,%d,%p)
\n
"
,
hdc
,
iPixelFormat
,
nBytes
,
ppfd
);
if
(
!
ppfd
)
return
nb_onscreen_formats
;
if
(
nBytes
<
sizeof
(
PIXELFORMATDESCRIPTOR
))
{
ERR
(
"Wrong structure size !
\n
"
);
/* Should set error */
return
0
;
}
return
describe_pixel_format
(
iPixelFormat
,
ppfd
,
FALSE
);
}
/***********************************************************************
* glxdrv_wglGetPixelFormat
*/
...
...
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