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
0eae0858
Commit
0eae0858
authored
Sep 20, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set the default scissor rect from the swapchain desc in state_init_default().
We always have a swapchain here, even if there are no back buffers.
parent
49c6b87a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
26 deletions
+14
-26
stateblock.c
dlls/wined3d/stateblock.c
+14
-26
No files found.
dlls/wined3d/stateblock.c
View file @
0eae0858
...
@@ -1181,8 +1181,7 @@ void state_init_default(struct wined3d_state *state, struct wined3d_device *devi
...
@@ -1181,8 +1181,7 @@ void state_init_default(struct wined3d_state *state, struct wined3d_device *devi
DWORD
d
;
DWORD
d
;
}
tmpfloat
;
}
tmpfloat
;
unsigned
int
i
;
unsigned
int
i
;
struct
wined3d_swapchain
*
swapchain
;
struct
wined3d_swapchain_desc
*
swapchain_desc
;
struct
wined3d_surface
*
backbuffer
;
static
const
struct
wined3d_matrix
identity
=
static
const
struct
wined3d_matrix
identity
=
{{{
{{{
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
...
@@ -1386,32 +1385,21 @@ void state_init_default(struct wined3d_state *state, struct wined3d_device *devi
...
@@ -1386,32 +1385,21 @@ void state_init_default(struct wined3d_state *state, struct wined3d_device *devi
state
->
textures
[
i
]
=
NULL
;
state
->
textures
[
i
]
=
NULL
;
}
}
/* check the return values, because the GetBackBuffer call isn't valid for ddraw */
swapchain_desc
=
&
device
->
swapchains
[
0
]
->
desc
;
if
((
swapchain
=
wined3d_device_get_swapchain
(
device
,
0
)))
{
if
((
backbuffer
=
wined3d_swapchain_get_back_buffer
(
swapchain
,
0
,
WINED3D_BACKBUFFER_TYPE_MONO
)))
{
struct
wined3d_resource_desc
desc
;
wined3d_resource_get_desc
(
&
backbuffer
->
resource
,
&
desc
);
/* Set the default scissor rect values */
/* Set the default scissor rect values */
state
->
scissor_rect
.
left
=
0
;
state
->
scissor_rect
.
left
=
0
;
state
->
scissor_rect
.
right
=
desc
.
width
;
state
->
scissor_rect
.
right
=
swapchain_desc
->
backbuffer_width
;
state
->
scissor_rect
.
top
=
0
;
state
->
scissor_rect
.
top
=
0
;
state
->
scissor_rect
.
bottom
=
desc
.
height
;
state
->
scissor_rect
.
bottom
=
swapchain_desc
->
backbuffer_height
;
}
/* Set the default viewport */
state
->
viewport
.
x
=
0
;
state
->
viewport
.
y
=
0
;
state
->
viewport
.
width
=
swapchain
->
desc
.
backbuffer_width
;
state
->
viewport
.
height
=
swapchain
->
desc
.
backbuffer_height
;
state
->
viewport
.
min_z
=
0
.
0
f
;
state
->
viewport
.
max_z
=
1
.
0
f
;
}
TRACE
(
"Done.
\n
"
);
/* Set the default viewport */
state
->
viewport
.
x
=
0
;
state
->
viewport
.
y
=
0
;
state
->
viewport
.
width
=
swapchain_desc
->
backbuffer_width
;
state
->
viewport
.
height
=
swapchain_desc
->
backbuffer_height
;
state
->
viewport
.
min_z
=
0
.
0
f
;
state
->
viewport
.
max_z
=
1
.
0
f
;
}
}
static
HRESULT
stateblock_init
(
struct
wined3d_stateblock
*
stateblock
,
static
HRESULT
stateblock_init
(
struct
wined3d_stateblock
*
stateblock
,
...
...
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