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
Hide 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
...
@@ -1152,19 +1152,18 @@ static BOOL wined3d_context_gl_restore_pixel_format(struct wined3d_context_gl *c
return
ret
;
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
->
c
.
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
BOOL
private
=
context_gl
->
c
.
hdc_is_private
;
BOOL
private
=
context
->
hdc_is_private
;
int
format
=
context_gl
->
c
.
pixel_format
;
int
format
=
context
->
pixel_format
;
HDC
dc
=
context_gl
->
c
.
hdc
;
HDC
dc
=
context
->
hdc
;
int
current
;
int
current
;
if
(
private
&&
context
->
hdc_has_format
)
if
(
private
&&
context
_gl
->
c
.
hdc_has_format
)
return
TRUE
;
return
TRUE
;
if
(
!
private
&&
WindowFromDC
(
dc
)
!=
context
->
win_handle
)
if
(
!
private
&&
WindowFromDC
(
dc
)
!=
context
_gl
->
c
.
win_handle
)
return
FALSE
;
return
FALSE
;
current
=
gl_info
->
gl_ops
.
wgl
.
p_wglGetPixelFormat
(
dc
);
current
=
gl_info
->
gl_ops
.
wgl
.
p_wglGetPixelFormat
(
dc
);
...
@@ -1180,8 +1179,8 @@ static BOOL context_set_pixel_format(struct wined3d_context *context)
...
@@ -1180,8 +1179,8 @@ static BOOL context_set_pixel_format(struct wined3d_context *context)
return
FALSE
;
return
FALSE
;
}
}
context
->
restore_pf
=
0
;
context
_gl
->
c
.
restore_pf
=
0
;
context
->
restore_pf_win
=
private
?
NULL
:
WindowFromDC
(
dc
);
context
_gl
->
c
.
restore_pf_win
=
private
?
NULL
:
WindowFromDC
(
dc
);
goto
success
;
goto
success
;
}
}
...
@@ -1201,12 +1200,12 @@ static BOOL context_set_pixel_format(struct wined3d_context *context)
...
@@ -1201,12 +1200,12 @@ static BOOL context_set_pixel_format(struct wined3d_context *context)
}
}
win
=
private
?
NULL
:
WindowFromDC
(
dc
);
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
);
wined3d_context_gl_restore_pixel_format
(
context_gl
);
context
->
restore_pf
=
private
?
0
:
current
;
context
_gl
->
c
.
restore_pf
=
private
?
0
:
current
;
context
->
restore_pf_win
=
win
;
context
_gl
->
c
.
restore_pf_win
=
win
;
}
}
goto
success
;
goto
success
;
...
@@ -1222,16 +1221,17 @@ static BOOL context_set_pixel_format(struct wined3d_context *context)
...
@@ -1222,16 +1221,17 @@ static BOOL context_set_pixel_format(struct wined3d_context *context)
success:
success:
if
(
private
)
if
(
private
)
context
->
hdc_has_format
=
TRUE
;
context
_gl
->
c
.
hdc_has_format
=
TRUE
;
return
TRUE
;
return
TRUE
;
}
}
static
BOOL
context_set_gl_context
(
struct
wined3d_context
*
ctx
)
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
;
struct
wined3d_swapchain
*
swapchain
=
ctx
->
swapchain
;
BOOL
backup
=
FALSE
;
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
"
,
WARN
(
"Failed to set pixel format %d on device context %p.
\n
"
,
ctx
->
pixel_format
,
ctx
->
hdc
);
ctx
->
pixel_format
,
ctx
->
hdc
);
...
@@ -1265,7 +1265,7 @@ static BOOL context_set_gl_context(struct wined3d_context *ctx)
...
@@ -1265,7 +1265,7 @@ static BOOL context_set_gl_context(struct wined3d_context *ctx)
ctx
->
hdc_is_private
=
TRUE
;
ctx
->
hdc_is_private
=
TRUE
;
ctx
->
hdc_has_format
=
FALSE
;
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
"
,
ERR
(
"Failed to set pixel format %d on device context %p.
\n
"
,
ctx
->
pixel_format
,
ctx
->
hdc
);
ctx
->
pixel_format
,
ctx
->
hdc
);
...
@@ -2113,7 +2113,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
...
@@ -2113,7 +2113,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
context_enter
(
context
);
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
);
ERR
(
"Failed to set pixel format %d on device context %p.
\n
"
,
context
->
pixel_format
,
context
->
hdc
);
context_release
(
context
);
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