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
cff896b3
Commit
cff896b3
authored
Apr 23, 2024
by
Alexandros Frantzis
Committed by
Alexandre Julliard
Apr 24, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Enable wglDescribePixelFormat through p_get_pixel_formats.
parent
55714223
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
opengl.c
dlls/winex11.drv/opengl.c
+22
-22
No files found.
dlls/winex11.drv/opengl.c
View file @
cff896b3
...
...
@@ -1681,27 +1681,6 @@ static int describe_pixel_format( int iPixelFormat, PIXELFORMATDESCRIPTOR *ppfd,
return
nb_onscreen_formats
;
}
/**
* glxdrv_DescribePixelFormat
*
* Get the pixel-format descriptor associated to the given id
*/
static
int
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
...
...
@@ -3428,19 +3407,40 @@ static BOOL glxdrv_wglSwapBuffers( HDC hdc )
return
TRUE
;
}
static
void
glxdrv_get_pixel_formats
(
struct
wgl_pixel_format
*
formats
,
UINT
max_formats
,
UINT
*
num_formats
,
UINT
*
num_onscreen_formats
)
{
UINT
i
;
if
(
!
has_opengl
())
{
*
num_formats
=
*
num_onscreen_formats
=
0
;
return
;
}
if
(
formats
)
{
for
(
i
=
0
;
i
<
min
(
max_formats
,
nb_pixel_formats
);
++
i
)
describe_pixel_format
(
i
+
1
,
&
formats
[
i
].
pfd
,
TRUE
);
}
*
num_formats
=
nb_pixel_formats
;
*
num_onscreen_formats
=
nb_onscreen_formats
;
}
static
struct
opengl_funcs
opengl_funcs
=
{
{
glxdrv_wglCopyContext
,
/* p_wglCopyContext */
glxdrv_wglCreateContext
,
/* p_wglCreateContext */
glxdrv_wglDeleteContext
,
/* p_wglDeleteContext */
glxdrv_wglDescribePixelFormat
,
/* p_wglDescribePixelFormat */
NULL
,
/* p_wglDescribePixelFormat */
glxdrv_wglGetPixelFormat
,
/* p_wglGetPixelFormat */
glxdrv_wglGetProcAddress
,
/* p_wglGetProcAddress */
glxdrv_wglMakeCurrent
,
/* p_wglMakeCurrent */
glxdrv_wglSetPixelFormat
,
/* p_wglSetPixelFormat */
glxdrv_wglShareLists
,
/* p_wglShareLists */
glxdrv_wglSwapBuffers
,
/* p_wglSwapBuffers */
glxdrv_get_pixel_formats
,
/* p_get_pixel_formats */
}
};
...
...
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