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
73eceafb
Commit
73eceafb
authored
Jul 08, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Implement d3d9_device_ResetEx().
parent
3543e1d1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
22 deletions
+52
-22
device.c
dlls/d3d8/device.c
+1
-1
device.c
dlls/d3d9/device.c
+27
-3
ddraw.c
dlls/ddraw/ddraw.c
+1
-1
device.c
dlls/wined3d/device.c
+20
-15
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-1
wined3d.h
include/wine/wined3d.h
+2
-1
No files found.
dlls/d3d8/device.c
View file @
73eceafb
...
...
@@ -598,7 +598,7 @@ static HRESULT WINAPI d3d8_device_Reset(IDirect3DDevice8 *iface,
wined3d_mutex_lock
();
wined3d_swapchain_desc_from_present_parameters
(
&
swapchain_desc
,
present_parameters
);
if
(
SUCCEEDED
(
hr
=
wined3d_device_reset
(
device
->
wined3d_device
,
&
swapchain_desc
,
reset_enum_callback
)))
if
(
SUCCEEDED
(
hr
=
wined3d_device_reset
(
device
->
wined3d_device
,
&
swapchain_desc
,
NULL
,
reset_enum_callback
)))
{
hr
=
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_POINTSIZE_MIN
,
0
);
device
->
lost
=
FALSE
;
...
...
dlls/d3d9/device.c
View file @
73eceafb
...
...
@@ -583,7 +583,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_Reset(IDirect3DDevice9Ex *if
wined3d_mutex_lock
();
wined3d_swapchain_desc_from_present_parameters
(
&
swapchain_desc
,
present_parameters
);
hr
=
wined3d_device_reset
(
device
->
wined3d_device
,
&
swapchain_desc
,
reset_enum_callback
);
hr
=
wined3d_device_reset
(
device
->
wined3d_device
,
&
swapchain_desc
,
NULL
,
reset_enum_callback
);
if
(
FAILED
(
hr
))
device
->
not_reset
=
TRUE
;
else
...
...
@@ -2954,9 +2954,33 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex
static
HRESULT
WINAPI
d3d9_device_ResetEx
(
IDirect3DDevice9Ex
*
iface
,
D3DPRESENT_PARAMETERS
*
present_parameters
,
D3DDISPLAYMODEEX
*
mode
)
{
FIXME
(
"iface %p, present_parameters %p, mode %p stub!
\n
"
,
iface
,
present_parameters
,
mode
);
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
struct
wined3d_swapchain_desc
swapchain_desc
;
struct
wined3d_display_mode
wined3d_mode
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, present_parameters %p, mode %p.
\n
"
,
iface
,
present_parameters
,
mode
);
if
(
mode
)
{
wined3d_mode
.
width
=
mode
->
Width
;
wined3d_mode
.
height
=
mode
->
Height
;
wined3d_mode
.
refresh_rate
=
mode
->
RefreshRate
;
wined3d_mode
.
format_id
=
wined3dformat_from_d3dformat
(
mode
->
Format
);
wined3d_mode
.
scanline_ordering
=
mode
->
ScanLineOrdering
;
}
wined3d_mutex_lock
();
wined3d_swapchain_desc_from_present_parameters
(
&
swapchain_desc
,
present_parameters
);
hr
=
wined3d_device_reset
(
device
->
wined3d_device
,
&
swapchain_desc
,
mode
?
&
wined3d_mode
:
NULL
,
reset_enum_callback
);
if
(
FAILED
(
hr
))
device
->
not_reset
=
TRUE
;
else
device
->
not_reset
=
FALSE
;
wined3d_mutex_unlock
();
return
hr
;
}
static
HRESULT
WINAPI
d3d9_device_GetDisplayModeEx
(
IDirect3DDevice9Ex
*
iface
,
...
...
dlls/ddraw/ddraw.c
View file @
73eceafb
...
...
@@ -3020,7 +3020,7 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
swapchain_desc
.
backbuffer_format
=
mode
.
format_id
;
hr
=
wined3d_device_reset
(
ddraw
->
wined3d_device
,
&
swapchain_desc
,
ddraw_reset_enum_callback
);
&
swapchain_desc
,
NULL
,
ddraw_reset_enum_callback
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to reset device.
\n
"
);
...
...
dlls/wined3d/device.c
View file @
73eceafb
...
...
@@ -5136,18 +5136,18 @@ err:
/* Do not call while under the GL lock. */
HRESULT
CDECL
wined3d_device_reset
(
struct
wined3d_device
*
device
,
const
struct
wined3d_swapchain_desc
*
swapchain_desc
,
const
struct
wined3d_swapchain_desc
*
swapchain_desc
,
const
struct
wined3d_display_mode
*
mode
,
wined3d_device_reset_cb
callback
)
{
struct
wined3d_resource
*
resource
,
*
cursor
;
struct
wined3d_swapchain
*
swapchain
;
struct
wined3d_display_mode
m
ode
;
struct
wined3d_display_mode
m
;
BOOL
DisplayModeChanged
=
FALSE
;
BOOL
update_desc
=
FALSE
;
unsigned
int
i
;
HRESULT
hr
;
TRACE
(
"device %p, swapchain_desc %p
.
\n
"
,
device
,
swapchain_desc
);
TRACE
(
"device %p, swapchain_desc %p
, mode %p, callback %p.
\n
"
,
device
,
swapchain_desc
,
mode
,
callback
);
if
(
FAILED
(
hr
=
wined3d_device_get_swapchain
(
device
,
0
,
&
swapchain
)))
{
...
...
@@ -5254,21 +5254,26 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if
(
swapchain_desc
->
enable_auto_depth_stencil
)
wined3d_device_set_depth_stencil
(
device
,
device
->
auto_depth_stencil
);
if
(
swapchain_desc
->
windowed
)
if
(
mode
)
{
DisplayModeChanged
=
TRUE
;
m
=
*
mode
;
}
else
if
(
swapchain_desc
->
windowed
)
{
m
ode
.
width
=
swapchain
->
orig_width
;
m
ode
.
height
=
swapchain
->
orig_height
;
m
ode
.
refresh_rate
=
0
;
m
ode
.
format_id
=
swapchain
->
desc
.
backbuffer_format
;
m
ode
.
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_UNKNOWN
;
m
.
width
=
swapchain
->
orig_width
;
m
.
height
=
swapchain
->
orig_height
;
m
.
refresh_rate
=
0
;
m
.
format_id
=
swapchain
->
desc
.
backbuffer_format
;
m
.
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_UNKNOWN
;
}
else
{
m
ode
.
width
=
swapchain_desc
->
backbuffer_width
;
m
ode
.
height
=
swapchain_desc
->
backbuffer_height
;
m
ode
.
refresh_rate
=
swapchain_desc
->
refresh_rate
;
m
ode
.
format_id
=
swapchain_desc
->
backbuffer_format
;
m
ode
.
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_UNKNOWN
;
m
.
width
=
swapchain_desc
->
backbuffer_width
;
m
.
height
=
swapchain_desc
->
backbuffer_height
;
m
.
refresh_rate
=
swapchain_desc
->
refresh_rate
;
m
.
format_id
=
swapchain_desc
->
backbuffer_format
;
m
.
scanline_ordering
=
WINED3D_SCANLINE_ORDERING_UNKNOWN
;
}
/* Should Width == 800 && Height == 0 set 800x600? */
...
...
@@ -5339,7 +5344,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if
(
!
swapchain_desc
->
windowed
!=
!
swapchain
->
desc
.
windowed
||
DisplayModeChanged
)
{
if
(
FAILED
(
hr
=
wined3d_set_adapter_display_mode
(
device
->
wined3d
,
device
->
adapter
->
ordinal
,
&
m
ode
)))
if
(
FAILED
(
hr
=
wined3d_set_adapter_display_mode
(
device
->
wined3d
,
device
->
adapter
->
ordinal
,
&
m
)))
{
WARN
(
"Failed to set display mode, hr %#x.
\n
"
,
hr
);
wined3d_swapchain_decref
(
swapchain
);
...
...
dlls/wined3d/wined3d.spec
View file @
73eceafb
...
...
@@ -101,7 +101,7 @@
@ cdecl wined3d_device_present(ptr ptr ptr ptr ptr long)
@ cdecl wined3d_device_process_vertices(ptr long long long ptr ptr long long)
@ cdecl wined3d_device_release_focus_window(ptr)
@ cdecl wined3d_device_reset(ptr ptr ptr)
@ cdecl wined3d_device_reset(ptr ptr ptr
ptr
)
@ cdecl wined3d_device_restore_fullscreen_window(ptr ptr)
@ cdecl wined3d_device_set_base_vertex_index(ptr long)
@ cdecl wined3d_device_set_clip_plane(ptr long ptr)
...
...
include/wine/wined3d.h
View file @
73eceafb
...
...
@@ -2188,7 +2188,8 @@ HRESULT __cdecl wined3d_device_process_vertices(struct wined3d_device *device,
const
struct
wined3d_vertex_declaration
*
declaration
,
DWORD
flags
,
DWORD
dst_fvf
);
void
__cdecl
wined3d_device_release_focus_window
(
struct
wined3d_device
*
device
);
HRESULT
__cdecl
wined3d_device_reset
(
struct
wined3d_device
*
device
,
const
struct
wined3d_swapchain_desc
*
swapchain_desc
,
wined3d_device_reset_cb
callback
);
const
struct
wined3d_swapchain_desc
*
swapchain_desc
,
const
struct
wined3d_display_mode
*
mode
,
wined3d_device_reset_cb
callback
);
void
__cdecl
wined3d_device_restore_fullscreen_window
(
struct
wined3d_device
*
device
,
HWND
window
);
HRESULT
__cdecl
wined3d_device_set_base_vertex_index
(
struct
wined3d_device
*
device
,
INT
base_index
);
HRESULT
__cdecl
wined3d_device_set_clip_plane
(
struct
wined3d_device
*
device
,
...
...
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