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
0ce894f2
Commit
0ce894f2
authored
Jun 27, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Implement d3d9_device_GetDisplayModeEx().
parent
2c8834df
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
17 deletions
+40
-17
device.c
dlls/d3d8/device.c
+1
-1
device.c
dlls/d3d9/device.c
+26
-4
swapchain.c
dlls/d3d9/swapchain.c
+1
-1
device.c
dlls/wined3d/device.c
+5
-4
swapchain.c
dlls/wined3d/swapchain.c
+4
-4
wined3d.h
include/wine/wined3d.h
+3
-3
No files found.
dlls/d3d8/device.c
View file @
0ce894f2
...
...
@@ -421,7 +421,7 @@ static HRESULT WINAPI d3d8_device_GetDisplayMode(IDirect3DDevice8 *iface, D3DDIS
TRACE
(
"iface %p, mode %p.
\n
"
,
iface
,
mode
);
wined3d_mutex_lock
();
hr
=
wined3d_device_get_display_mode
(
device
->
wined3d_device
,
0
,
&
wined3d_mode
);
hr
=
wined3d_device_get_display_mode
(
device
->
wined3d_device
,
0
,
&
wined3d_mode
,
NULL
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
...
...
dlls/d3d9/device.c
View file @
0ce894f2
...
...
@@ -363,7 +363,7 @@ static HRESULT WINAPI d3d9_device_GetDisplayMode(IDirect3DDevice9Ex *iface, UINT
TRACE
(
"iface %p, swapchain %u, mode %p.
\n
"
,
iface
,
swapchain
,
mode
);
wined3d_mutex_lock
();
hr
=
wined3d_device_get_display_mode
(
device
->
wined3d_device
,
swapchain
,
&
wined3d_mode
);
hr
=
wined3d_device_get_display_mode
(
device
->
wined3d_device
,
swapchain
,
&
wined3d_mode
,
NULL
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
...
...
@@ -2930,12 +2930,34 @@ static HRESULT WINAPI d3d9_device_ResetEx(IDirect3DDevice9Ex *iface,
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
d3d9_device_GetDisplayModeEx
(
IDirect3DDevice9Ex
*
iface
,
static
HRESULT
WINAPI
d3d9_device_GetDisplayModeEx
(
IDirect3DDevice9Ex
*
iface
,
UINT
swapchain_idx
,
D3DDISPLAYMODEEX
*
mode
,
D3DDISPLAYROTATION
*
rotation
)
{
FIXME
(
"iface %p, swapchain_idx %u, mode %p, rotation %p stub!
\n
"
,
iface
,
swapchain_idx
,
mode
,
rotation
);
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
struct
wined3d_display_mode
wined3d_mode
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, swapchain_idx %u, mode %p, rotation %p.
\n
"
,
iface
,
swapchain_idx
,
mode
,
rotation
);
if
(
mode
->
Size
!=
sizeof
(
*
mode
))
return
D3DERR_INVALIDCALL
;
wined3d_mutex_lock
();
hr
=
wined3d_device_get_display_mode
(
device
->
wined3d_device
,
swapchain_idx
,
&
wined3d_mode
,
(
enum
wined3d_display_rotation
*
)
rotation
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
{
mode
->
Width
=
wined3d_mode
.
width
;
mode
->
Height
=
wined3d_mode
.
height
;
mode
->
RefreshRate
=
wined3d_mode
.
refresh_rate
;
mode
->
Format
=
d3dformat_from_wined3dformat
(
wined3d_mode
.
format_id
);
mode
->
ScanLineOrdering
=
wined3d_mode
.
scanline_ordering
;
}
return
hr
;
}
static
const
struct
IDirect3DDevice9ExVtbl
d3d9_device_vtbl
=
...
...
dlls/d3d9/swapchain.c
View file @
0ce894f2
...
...
@@ -175,7 +175,7 @@ static HRESULT WINAPI d3d9_swapchain_GetDisplayMode(IDirect3DSwapChain9 *iface,
TRACE
(
"iface %p, mode %p.
\n
"
,
iface
,
mode
);
wined3d_mutex_lock
();
hr
=
wined3d_swapchain_get_display_mode
(
swapchain
->
wined3d_swapchain
,
&
wined3d_mode
);
hr
=
wined3d_swapchain_get_display_mode
(
swapchain
->
wined3d_swapchain
,
&
wined3d_mode
,
NULL
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
...
...
dlls/wined3d/device.c
View file @
0ce894f2
...
...
@@ -3715,17 +3715,18 @@ HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device
device
->
create_parms
.
device_type
,
caps
);
}
HRESULT
CDECL
wined3d_device_get_display_mode
(
const
struct
wined3d_device
*
device
,
UINT
swapchain_idx
,
struct
wined3d_display_mode
*
mode
)
HRESULT
CDECL
wined3d_device_get_display_mode
(
const
struct
wined3d_device
*
device
,
UINT
swapchain_idx
,
struct
wined3d_display_mode
*
mode
,
enum
wined3d_display_rotation
*
rotation
)
{
struct
wined3d_swapchain
*
swapchain
;
HRESULT
hr
;
TRACE
(
"device %p, swapchain_idx %u, mode %p.
\n
"
,
device
,
swapchain_idx
,
mode
);
TRACE
(
"device %p, swapchain_idx %u, mode %p, rotation %p.
\n
"
,
device
,
swapchain_idx
,
mode
,
rotation
);
if
(
SUCCEEDED
(
hr
=
wined3d_device_get_swapchain
(
device
,
swapchain_idx
,
&
swapchain
)))
{
hr
=
wined3d_swapchain_get_display_mode
(
swapchain
,
mode
);
hr
=
wined3d_swapchain_get_display_mode
(
swapchain
,
mode
,
rotation
);
wined3d_swapchain_decref
(
swapchain
);
}
...
...
dlls/wined3d/swapchain.c
View file @
0ce894f2
...
...
@@ -239,7 +239,7 @@ HRESULT CDECL wined3d_swapchain_get_raster_status(const struct wined3d_swapchain
if
(
!
QueryPerformanceCounter
(
&
counter
)
||
!
QueryPerformanceFrequency
(
&
freq_per_sec
))
return
WINED3DERR_INVALIDCALL
;
if
(
FAILED
(
wined3d_swapchain_get_display_mode
(
swapchain
,
&
mode
)))
if
(
FAILED
(
wined3d_swapchain_get_display_mode
(
swapchain
,
&
mode
,
NULL
)))
return
WINED3DERR_INVALIDCALL
;
if
(
mode
.
refresh_rate
==
DEFAULT_REFRESH_RATE
)
mode
.
refresh_rate
=
60
;
...
...
@@ -261,14 +261,14 @@ HRESULT CDECL wined3d_swapchain_get_raster_status(const struct wined3d_swapchain
}
HRESULT
CDECL
wined3d_swapchain_get_display_mode
(
const
struct
wined3d_swapchain
*
swapchain
,
struct
wined3d_display_mode
*
mode
)
struct
wined3d_display_mode
*
mode
,
enum
wined3d_display_rotation
*
rotation
)
{
HRESULT
hr
;
TRACE
(
"swapchain %p, mode %p
.
\n
"
,
swapchain
,
mode
);
TRACE
(
"swapchain %p, mode %p
, rotation %p.
\n
"
,
swapchain
,
mode
,
rotation
);
hr
=
wined3d_get_adapter_display_mode
(
swapchain
->
device
->
wined3d
,
swapchain
->
device
->
adapter
->
ordinal
,
mode
,
NULL
);
swapchain
->
device
->
adapter
->
ordinal
,
mode
,
rotation
);
TRACE
(
"Returning w %u, h %u, refresh rate %u, format %s.
\n
"
,
mode
->
width
,
mode
->
height
,
mode
->
refresh_rate
,
debug_d3dformat
(
mode
->
format_id
));
...
...
include/wine/wined3d.h
View file @
0ce894f2
...
...
@@ -2117,8 +2117,8 @@ HRESULT __cdecl wined3d_device_get_creation_parameters(const struct wined3d_devi
HRESULT
__cdecl
wined3d_device_get_depth_stencil
(
const
struct
wined3d_device
*
device
,
struct
wined3d_surface
**
depth_stencil
);
HRESULT
__cdecl
wined3d_device_get_device_caps
(
const
struct
wined3d_device
*
device
,
WINED3DCAPS
*
caps
);
HRESULT
__cdecl
wined3d_device_get_display_mode
(
const
struct
wined3d_device
*
device
,
UINT
swapchain_idx
,
struct
wined3d_display_mode
*
mode
);
HRESULT
__cdecl
wined3d_device_get_display_mode
(
const
struct
wined3d_device
*
device
,
UINT
swapchain_idx
,
struct
wined3d_display_mode
*
mode
,
enum
wined3d_display_rotation
*
rotation
);
HRESULT
__cdecl
wined3d_device_get_front_buffer_data
(
const
struct
wined3d_device
*
device
,
UINT
swapchain_idx
,
struct
wined3d_surface
*
dst_surface
);
void
__cdecl
wined3d_device_get_gamma_ramp
(
const
struct
wined3d_device
*
device
,
...
...
@@ -2366,7 +2366,7 @@ HRESULT __cdecl wined3d_swapchain_get_back_buffer(const struct wined3d_swapchain
UINT
backbuffer_idx
,
enum
wined3d_backbuffer_type
backbuffer_type
,
struct
wined3d_surface
**
backbuffer
);
struct
wined3d_device
*
__cdecl
wined3d_swapchain_get_device
(
const
struct
wined3d_swapchain
*
swapchain
);
HRESULT
__cdecl
wined3d_swapchain_get_display_mode
(
const
struct
wined3d_swapchain
*
swapchain
,
struct
wined3d_display_mode
*
mode
);
struct
wined3d_display_mode
*
mode
,
enum
wined3d_display_rotation
*
rotation
);
HRESULT
__cdecl
wined3d_swapchain_get_front_buffer_data
(
const
struct
wined3d_swapchain
*
swapchain
,
struct
wined3d_surface
*
dst_surface
);
HRESULT
__cdecl
wined3d_swapchain_get_gamma_ramp
(
const
struct
wined3d_swapchain
*
swapchain
,
...
...
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