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
ff64d67f
Commit
ff64d67f
authored
Jan 20, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineandroid: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough.
parent
f605add4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
opengl.c
dlls/wineandroid.drv/opengl.c
+12
-6
No files found.
dlls/wineandroid.drv/opengl.c
View file @
ff64d67f
...
...
@@ -208,11 +208,10 @@ void update_gl_drawable( HWND hwnd )
}
}
static
BOOL
set_pixel_format
(
HDC
hdc
,
int
format
,
BOOL
allow_change
)
static
BOOL
set_pixel_format
(
HDC
hdc
,
int
format
,
BOOL
internal
)
{
struct
gl_drawable
*
gl
;
HWND
hwnd
=
NtUserWindowFromDC
(
hdc
);
int
prev
=
0
;
if
(
!
hwnd
||
hwnd
==
NtUserGetDesktopWindow
())
{
...
...
@@ -226,10 +225,18 @@ static BOOL set_pixel_format( HDC hdc, int format, BOOL allow_change )
}
TRACE
(
"%p/%p format %d
\n
"
,
hdc
,
hwnd
,
format
);
if
(
!
internal
)
{
/* cannot change it if already set */
int
prev
=
win32u_get_window_pixel_format
(
hwnd
);
if
(
prev
)
return
prev
==
format
;
}
if
((
gl
=
get_gl_drawable
(
hwnd
,
0
)))
{
prev
=
gl
->
format
;
if
(
allow_change
)
if
(
internal
)
{
EGLint
pf
;
p_eglGetConfigAttrib
(
display
,
pixel_formats
[
format
-
1
].
config
,
EGL_NATIVE_VISUAL_ID
,
&
pf
);
...
...
@@ -241,8 +248,7 @@ static BOOL set_pixel_format( HDC hdc, int format, BOOL allow_change )
release_gl_drawable
(
gl
);
if
(
prev
&&
prev
!=
format
&&
!
allow_change
)
return
FALSE
;
if
(
win32u_set_window_pixel_format
(
hwnd
,
format
,
FALSE
))
return
TRUE
;
if
(
win32u_set_window_pixel_format
(
hwnd
,
format
,
internal
))
return
TRUE
;
destroy_gl_drawable
(
hwnd
);
return
FALSE
;
}
...
...
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