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
8d4e3d0d
Commit
8d4e3d0d
authored
Jun 29, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Implement d3d9_GetAdapterModeCountEx().
parent
256d4331
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
10 deletions
+37
-10
directx.c
dlls/d3d8/directx.c
+2
-1
directx.c
dlls/d3d9/directx.c
+15
-3
output.c
dlls/dxgi/output.c
+2
-1
directx.c
dlls/wined3d/directx.c
+16
-3
wined3d.h
include/wine/wined3d.h
+2
-2
No files found.
dlls/d3d8/directx.c
View file @
8d4e3d0d
...
...
@@ -157,7 +157,8 @@ static UINT WINAPI d3d8_GetAdapterModeCount(IDirect3D8 *iface, UINT adapter)
TRACE
(
"iface %p, adapter %u.
\n
"
,
iface
,
adapter
);
wined3d_mutex_lock
();
hr
=
wined3d_get_adapter_mode_count
(
d3d8
->
wined3d
,
adapter
,
0
);
hr
=
wined3d_get_adapter_mode_count
(
d3d8
->
wined3d
,
adapter
,
WINED3DFMT_UNKNOWN
,
WINED3D_SCANLINE_ORDERING_UNKNOWN
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/directx.c
View file @
8d4e3d0d
...
...
@@ -164,7 +164,8 @@ static UINT WINAPI d3d9_GetAdapterModeCount(IDirect3D9Ex *iface, UINT adapter, D
return
0
;
wined3d_mutex_lock
();
ret
=
wined3d_get_adapter_mode_count
(
d3d9
->
wined3d
,
adapter
,
wined3dformat_from_d3dformat
(
format
));
ret
=
wined3d_get_adapter_mode_count
(
d3d9
->
wined3d
,
adapter
,
wined3dformat_from_d3dformat
(
format
),
WINED3D_SCANLINE_ORDERING_UNKNOWN
);
wined3d_mutex_unlock
();
return
ret
;
...
...
@@ -477,9 +478,20 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_CreateDevice(IDirect3D9Ex *iface, U
static
UINT
WINAPI
d3d9_GetAdapterModeCountEx
(
IDirect3D9Ex
*
iface
,
UINT
adapter
,
const
D3DDISPLAYMODEFILTER
*
filter
)
{
FIXME
(
"iface %p, adapter %u, filter %p stub!
\n
"
,
iface
,
adapter
,
filter
);
struct
d3d9
*
d3d9
=
impl_from_IDirect3D9Ex
(
iface
);
UINT
ret
;
TRACE
(
"iface %p, adapter %u, filter %p.
\n
"
,
iface
,
adapter
,
filter
);
if
(
filter
->
Format
!=
D3DFMT_X8R8G8B8
&&
filter
->
Format
!=
D3DFMT_R5G6B5
)
return
0
;
return
0
;
wined3d_mutex_lock
();
ret
=
wined3d_get_adapter_mode_count
(
d3d9
->
wined3d
,
adapter
,
wined3dformat_from_d3dformat
(
filter
->
Format
),
filter
->
ScanLineOrdering
);
wined3d_mutex_unlock
();
return
ret
;
}
static
HRESULT
WINAPI
d3d9_EnumAdapterModesEx
(
IDirect3D9Ex
*
iface
,
...
...
dlls/dxgi/output.c
View file @
8d4e3d0d
...
...
@@ -146,7 +146,8 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
wined3d_format
=
wined3dformat_from_dxgi_format
(
format
);
EnterCriticalSection
(
&
dxgi_cs
);
max_count
=
wined3d_get_adapter_mode_count
(
wined3d
,
This
->
adapter
->
ordinal
,
wined3d_format
);
max_count
=
wined3d_get_adapter_mode_count
(
wined3d
,
This
->
adapter
->
ordinal
,
wined3d_format
,
WINED3D_SCANLINE_ORDERING_UNKNOWN
);
if
(
!
desc
)
{
...
...
dlls/wined3d/directx.c
View file @
8d4e3d0d
...
...
@@ -2892,7 +2892,7 @@ HMONITOR CDECL wined3d_get_adapter_monitor(const struct wined3d *wined3d, UINT a
/* Note: dx9 supplies a format. Calls from d3d8 supply WINED3DFMT_UNKNOWN */
UINT
CDECL
wined3d_get_adapter_mode_count
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_format_id
format_id
)
enum
wined3d_format_id
format_id
,
enum
wined3d_scanline_ordering
scanline_ordering
)
{
const
struct
wined3d_adapter
*
adapter
;
const
struct
wined3d_format
*
format
;
...
...
@@ -2901,7 +2901,8 @@ UINT CDECL wined3d_get_adapter_mode_count(const struct wined3d *wined3d, UINT ad
UINT
format_bits
;
DEVMODEW
mode
;
TRACE
(
"wined3d %p, adapter_idx %u, format %s.
\n
"
,
wined3d
,
adapter_idx
,
debug_d3dformat
(
format_id
));
TRACE
(
"wined3d %p, adapter_idx %u, format %s, scanline_ordering %#x.
\n
"
,
wined3d
,
adapter_idx
,
debug_d3dformat
(
format_id
),
scanline_ordering
);
if
(
adapter_idx
>=
wined3d
->
adapter_count
)
return
0
;
...
...
@@ -2915,6 +2916,17 @@ UINT CDECL wined3d_get_adapter_mode_count(const struct wined3d *wined3d, UINT ad
while
(
EnumDisplaySettingsExW
(
adapter
->
DeviceName
,
j
++
,
&
mode
,
0
))
{
if
(
mode
.
dmFields
&
DM_DISPLAYFLAGS
)
{
if
(
scanline_ordering
==
WINED3D_SCANLINE_ORDERING_PROGRESSIVE
&&
(
mode
.
u2
.
dmDisplayFlags
&
DM_INTERLACED
))
continue
;
if
(
scanline_ordering
==
WINED3D_SCANLINE_ORDERING_INTERLACED
&&
!
(
mode
.
u2
.
dmDisplayFlags
&
DM_INTERLACED
))
continue
;
}
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
{
/* This is for d3d8, do not enumerate P8 here. */
...
...
@@ -4406,7 +4418,8 @@ HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adap
}
/* If the requested display format is not available, don't continue. */
mode_count
=
wined3d_get_adapter_mode_count
(
wined3d
,
adapter_idx
,
display_format
);
mode_count
=
wined3d_get_adapter_mode_count
(
wined3d
,
adapter_idx
,
display_format
,
WINED3D_SCANLINE_ORDERING_UNKNOWN
);
if
(
!
mode_count
)
{
TRACE
(
"No available modes for display format %s.
\n
"
,
debug_d3dformat
(
display_format
));
...
...
include/wine/wined3d.h
View file @
8d4e3d0d
...
...
@@ -2043,8 +2043,8 @@ HRESULT __cdecl wined3d_get_adapter_display_mode(const struct wined3d *wined3d,
struct
wined3d_display_mode
*
mode
,
enum
wined3d_display_rotation
*
rotation
);
HRESULT
__cdecl
wined3d_get_adapter_identifier
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
DWORD
flags
,
struct
wined3d_adapter_identifier
*
identifier
);
UINT
__cdecl
wined3d_get_adapter_mode_count
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_format_id
format_id
);
UINT
__cdecl
wined3d_get_adapter_mode_count
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_format_id
format_id
,
enum
wined3d_scanline_ordering
scanline_ordering
);
HMONITOR
__cdecl
wined3d_get_adapter_monitor
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
);
HRESULT
__cdecl
wined3d_get_device_caps
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_device_type
device_type
,
WINED3DCAPS
*
caps
);
...
...
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