Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e97dc9f3
Commit
e97dc9f3
authored
Jul 02, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Implement d3d9_EnumAdapterModesEx().
parent
bb1740a4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
11 deletions
+47
-11
directx.c
dlls/d3d8/directx.c
+2
-1
directx.c
dlls/d3d9/directx.c
+24
-3
ddraw.c
dlls/ddraw/ddraw.c
+2
-2
output.c
dlls/dxgi/output.c
+2
-1
directx.c
dlls/wined3d/directx.c
+15
-3
wined3d.h
include/wine/wined3d.h
+2
-1
No files found.
dlls/d3d8/directx.c
View file @
e97dc9f3
...
...
@@ -174,7 +174,8 @@ static HRESULT WINAPI d3d8_EnumAdapterModes(IDirect3D8 *iface, UINT adapter, UIN
iface
,
adapter
,
mode_idx
,
mode
);
wined3d_mutex_lock
();
hr
=
wined3d_enum_adapter_modes
(
d3d8
->
wined3d
,
adapter
,
WINED3DFMT_UNKNOWN
,
mode_idx
,
&
wined3d_mode
);
hr
=
wined3d_enum_adapter_modes
(
d3d8
->
wined3d
,
adapter
,
WINED3DFMT_UNKNOWN
,
WINED3D_SCANLINE_ORDERING_UNKNOWN
,
mode_idx
,
&
wined3d_mode
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
...
...
dlls/d3d9/directx.c
View file @
e97dc9f3
...
...
@@ -186,7 +186,7 @@ static HRESULT WINAPI d3d9_EnumAdapterModes(IDirect3D9Ex *iface, UINT adapter,
wined3d_mutex_lock
();
hr
=
wined3d_enum_adapter_modes
(
d3d9
->
wined3d
,
adapter
,
wined3dformat_from_d3dformat
(
format
),
mode_idx
,
&
wined3d_mode
);
WINED3D_SCANLINE_ORDERING_UNKNOWN
,
mode_idx
,
&
wined3d_mode
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
...
...
@@ -497,10 +497,31 @@ static UINT WINAPI d3d9_GetAdapterModeCountEx(IDirect3D9Ex *iface,
static
HRESULT
WINAPI
d3d9_EnumAdapterModesEx
(
IDirect3D9Ex
*
iface
,
UINT
adapter
,
const
D3DDISPLAYMODEFILTER
*
filter
,
UINT
mode_idx
,
D3DDISPLAYMODEEX
*
mode
)
{
FIXME
(
"iface %p, adapter %u, filter %p, mode_idx %u, mode %p stub!
\n
"
,
struct
d3d9
*
d3d9
=
impl_from_IDirect3D9Ex
(
iface
);
struct
wined3d_display_mode
wined3d_mode
;
HRESULT
hr
;
TRACE
(
"iface %p, adapter %u, filter %p, mode_idx %u, mode %p.
\n
"
,
iface
,
adapter
,
filter
,
mode_idx
,
mode
);
return
E_NOTIMPL
;
if
(
filter
->
Format
!=
D3DFMT_X8R8G8B8
&&
filter
->
Format
!=
D3DFMT_R5G6B5
)
return
D3DERR_INVALIDCALL
;
wined3d_mutex_lock
();
hr
=
wined3d_enum_adapter_modes
(
d3d9
->
wined3d
,
adapter
,
wined3dformat_from_d3dformat
(
filter
->
Format
),
filter
->
ScanLineOrdering
,
mode_idx
,
&
wined3d_mode
);
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
HRESULT
WINAPI
d3d9_GetAdapterDisplayModeEx
(
IDirect3D9Ex
*
iface
,
...
...
dlls/ddraw/ddraw.c
View file @
e97dc9f3
...
...
@@ -2221,8 +2221,8 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags,
for
(
fmt
=
0
;
fmt
<
(
sizeof
(
checkFormatList
)
/
sizeof
(
checkFormatList
[
0
]));
fmt
++
)
{
modenum
=
0
;
while
(
wined3d_enum_adapter_modes
(
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
checkFormatList
[
fmt
]
,
modenum
++
,
&
mode
)
==
WINED3D_OK
)
while
(
wined3d_enum_adapter_modes
(
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
checkFormatList
[
fmt
],
WINED3D_SCANLINE_ORDERING_UNKNOWN
,
modenum
++
,
&
mode
)
==
WINED3D_OK
)
{
PixelFormat_WineD3DtoDD
(
&
pixelformat
,
mode
.
format_id
);
if
(
DDSD
)
...
...
dlls/dxgi/output.c
View file @
e97dc9f3
...
...
@@ -164,7 +164,8 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
struct
wined3d_display_mode
mode
;
HRESULT
hr
;
hr
=
wined3d_enum_adapter_modes
(
wined3d
,
This
->
adapter
->
ordinal
,
wined3d_format
,
i
,
&
mode
);
hr
=
wined3d_enum_adapter_modes
(
wined3d
,
This
->
adapter
->
ordinal
,
wined3d_format
,
WINED3D_SCANLINE_ORDERING_UNKNOWN
,
i
,
&
mode
);
if
(
FAILED
(
hr
))
{
WARN
(
"EnumAdapterModes failed, hr %#x.
\n
"
,
hr
);
...
...
dlls/wined3d/directx.c
View file @
e97dc9f3
...
...
@@ -2945,7 +2945,8 @@ UINT CDECL wined3d_get_adapter_mode_count(const struct wined3d *wined3d, UINT ad
/* Note: dx9 supplies a format. Calls from d3d8 supply WINED3DFMT_UNKNOWN */
HRESULT
CDECL
wined3d_enum_adapter_modes
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_format_id
format_id
,
UINT
mode_idx
,
struct
wined3d_display_mode
*
mode
)
enum
wined3d_format_id
format_id
,
enum
wined3d_scanline_ordering
scanline_ordering
,
UINT
mode_idx
,
struct
wined3d_display_mode
*
mode
)
{
const
struct
wined3d_adapter
*
adapter
;
const
struct
wined3d_format
*
format
;
...
...
@@ -2954,8 +2955,8 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
UINT
i
=
0
;
int
j
=
0
;
TRACE
(
"wined3d %p, adapter_idx %u, format %s, mode_idx %u, mode %p.
\n
"
,
wined3d
,
adapter_idx
,
debug_d3dformat
(
format_id
),
mode_idx
,
mode
);
TRACE
(
"wined3d %p, adapter_idx %u, format %s,
scanline_ordering %#x,
mode_idx %u, mode %p.
\n
"
,
wined3d
,
adapter_idx
,
debug_d3dformat
(
format_id
),
scanline_ordering
,
mode_idx
,
mode
);
if
(
!
mode
||
adapter_idx
>=
wined3d
->
adapter_count
)
return
WINED3DERR_INVALIDCALL
;
...
...
@@ -2975,6 +2976,17 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
return
WINED3DERR_INVALIDCALL
;
}
if
(
m
.
dmFields
&
DM_DISPLAYFLAGS
)
{
if
(
scanline_ordering
==
WINED3D_SCANLINE_ORDERING_PROGRESSIVE
&&
(
m
.
u2
.
dmDisplayFlags
&
DM_INTERLACED
))
continue
;
if
(
scanline_ordering
==
WINED3D_SCANLINE_ORDERING_INTERLACED
&&
!
(
m
.
u2
.
dmDisplayFlags
&
DM_INTERLACED
))
continue
;
}
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
{
/* This is for d3d8, do not enumerate P8 here. */
...
...
include/wine/wined3d.h
View file @
e97dc9f3
...
...
@@ -2037,7 +2037,8 @@ HRESULT __cdecl wined3d_check_device_type(const struct wined3d *wined3d, UINT ad
struct
wined3d
*
__cdecl
wined3d_create
(
UINT
version
,
DWORD
flags
);
ULONG
__cdecl
wined3d_decref
(
struct
wined3d
*
wined3d
);
HRESULT
__cdecl
wined3d_enum_adapter_modes
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
enum
wined3d_format_id
format_id
,
UINT
mode_idx
,
struct
wined3d_display_mode
*
mode
);
enum
wined3d_format_id
format_id
,
enum
wined3d_scanline_ordering
scanline_ordering
,
UINT
mode_idx
,
struct
wined3d_display_mode
*
mode
);
UINT
__cdecl
wined3d_get_adapter_count
(
const
struct
wined3d
*
wined3d
);
HRESULT
__cdecl
wined3d_get_adapter_display_mode
(
const
struct
wined3d
*
wined3d
,
UINT
adapter_idx
,
struct
wined3d_display_mode
*
mode
,
enum
wined3d_display_rotation
*
rotation
);
...
...
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