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
6cd822c3
Commit
6cd822c3
authored
May 19, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
May 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_context_gl structure to context_set_pixel_format().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
da91e15b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
context.c
dlls/wined3d/context.c
+17
-17
No files found.
dlls/wined3d/context.c
View file @
6cd822c3
...
...
@@ -1152,19 +1152,18 @@ static BOOL wined3d_context_gl_restore_pixel_format(struct wined3d_context_gl *c
return
ret
;
}
static
BOOL
context_set_pixel_format
(
struct
wined3d_context
*
context
)
static
BOOL
wined3d_context_gl_set_pixel_format
(
struct
wined3d_context_gl
*
context_gl
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
BOOL
private
=
context
->
hdc_is_private
;
int
format
=
context
->
pixel_format
;
HDC
dc
=
context
->
hdc
;
const
struct
wined3d_gl_info
*
gl_info
=
context_gl
->
c
.
gl_info
;
BOOL
private
=
context_gl
->
c
.
hdc_is_private
;
int
format
=
context_gl
->
c
.
pixel_format
;
HDC
dc
=
context_gl
->
c
.
hdc
;
int
current
;
if
(
private
&&
context
->
hdc_has_format
)
if
(
private
&&
context
_gl
->
c
.
hdc_has_format
)
return
TRUE
;
if
(
!
private
&&
WindowFromDC
(
dc
)
!=
context
->
win_handle
)
if
(
!
private
&&
WindowFromDC
(
dc
)
!=
context
_gl
->
c
.
win_handle
)
return
FALSE
;
current
=
gl_info
->
gl_ops
.
wgl
.
p_wglGetPixelFormat
(
dc
);
...
...
@@ -1180,8 +1179,8 @@ static BOOL context_set_pixel_format(struct wined3d_context *context)
return
FALSE
;
}
context
->
restore_pf
=
0
;
context
->
restore_pf_win
=
private
?
NULL
:
WindowFromDC
(
dc
);
context
_gl
->
c
.
restore_pf
=
0
;
context
_gl
->
c
.
restore_pf_win
=
private
?
NULL
:
WindowFromDC
(
dc
);
goto
success
;
}
...
...
@@ -1201,12 +1200,12 @@ static BOOL context_set_pixel_format(struct wined3d_context *context)
}
win
=
private
?
NULL
:
WindowFromDC
(
dc
);
if
(
win
!=
context
->
restore_pf_win
)
if
(
win
!=
context
_gl
->
c
.
restore_pf_win
)
{
wined3d_context_gl_restore_pixel_format
(
context_gl
);
context
->
restore_pf
=
private
?
0
:
current
;
context
->
restore_pf_win
=
win
;
context
_gl
->
c
.
restore_pf
=
private
?
0
:
current
;
context
_gl
->
c
.
restore_pf_win
=
win
;
}
goto
success
;
...
...
@@ -1222,16 +1221,17 @@ static BOOL context_set_pixel_format(struct wined3d_context *context)
success:
if
(
private
)
context
->
hdc_has_format
=
TRUE
;
context
_gl
->
c
.
hdc_has_format
=
TRUE
;
return
TRUE
;
}
static
BOOL
context_set_gl_context
(
struct
wined3d_context
*
ctx
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
ctx
);
struct
wined3d_swapchain
*
swapchain
=
ctx
->
swapchain
;
BOOL
backup
=
FALSE
;
if
(
!
context_set_pixel_format
(
ctx
))
if
(
!
wined3d_context_gl_set_pixel_format
(
context_gl
))
{
WARN
(
"Failed to set pixel format %d on device context %p.
\n
"
,
ctx
->
pixel_format
,
ctx
->
hdc
);
...
...
@@ -1265,7 +1265,7 @@ static BOOL context_set_gl_context(struct wined3d_context *ctx)
ctx
->
hdc_is_private
=
TRUE
;
ctx
->
hdc_has_format
=
FALSE
;
if
(
!
context_set_pixel_format
(
ctx
))
if
(
!
wined3d_context_gl_set_pixel_format
(
context_gl
))
{
ERR
(
"Failed to set pixel format %d on device context %p.
\n
"
,
ctx
->
pixel_format
,
ctx
->
hdc
);
...
...
@@ -2113,7 +2113,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
context_enter
(
context
);
if
(
!
context_set_pixel_format
(
context
))
if
(
!
wined3d_context_gl_set_pixel_format
(
context_gl
))
{
ERR
(
"Failed to set pixel format %d on device context %p.
\n
"
,
context
->
pixel_format
,
context
->
hdc
);
context_release
(
context
);
...
...
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