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
91f02018
Commit
91f02018
authored
Jun 28, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Avoid a useless call to wined3d_get_adapter_mode_count() in wined3d_enum_adapter_modes().
parent
e059d565
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
directx.c
dlls/wined3d/directx.c
+8
-11
No files found.
dlls/wined3d/directx.c
View file @
91f02018
...
@@ -2945,12 +2945,8 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
...
@@ -2945,12 +2945,8 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
TRACE
(
"wined3d %p, adapter_idx %u, format %s, mode_idx %u, mode %p.
\n
"
,
TRACE
(
"wined3d %p, adapter_idx %u, format %s, mode_idx %u, mode %p.
\n
"
,
wined3d
,
adapter_idx
,
debug_d3dformat
(
format_id
),
mode_idx
,
mode
);
wined3d
,
adapter_idx
,
debug_d3dformat
(
format_id
),
mode_idx
,
mode
);
/* Validate the parameters as much as possible */
if
(
!
mode
||
adapter_idx
>=
wined3d
->
adapter_count
)
if
(
!
mode
||
adapter_idx
>=
wined3d
->
adapter_count
||
mode_idx
>=
wined3d_get_adapter_mode_count
(
wined3d
,
adapter_idx
,
format_id
))
{
return
WINED3DERR_INVALIDCALL
;
return
WINED3DERR_INVALIDCALL
;
}
/* TODO: Store modes per adapter and read it from the adapter structure */
/* TODO: Store modes per adapter and read it from the adapter structure */
if
(
!
adapter_idx
)
if
(
!
adapter_idx
)
...
@@ -2968,8 +2964,14 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
...
@@ -2968,8 +2964,14 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
/* If we are filtering to a specific format (D3D9), then need to skip
/* If we are filtering to a specific format (D3D9), then need to skip
all unrelated modes, but if mode is irrelevant (D3D8), then we can
all unrelated modes, but if mode is irrelevant (D3D8), then we can
just count through the ones with valid bit depths */
just count through the ones with valid bit depths */
while
(
i
<=
mode_idx
&&
EnumDisplaySettingsExW
(
NULL
,
j
++
,
&
DevModeW
,
0
)
)
while
(
i
<=
mode_idx
)
{
{
if
(
!
EnumDisplaySettingsExW
(
NULL
,
j
++
,
&
DevModeW
,
0
))
{
WARN
(
"Invalid mode_idx %u.
\n
"
,
mode_idx
);
return
WINED3DERR_INVALIDCALL
;
}
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
if
(
format_id
==
WINED3DFMT_UNKNOWN
)
{
{
/* This is for D3D8, do not enumerate P8 here */
/* This is for D3D8, do not enumerate P8 here */
...
@@ -2981,11 +2983,6 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
...
@@ -2981,11 +2983,6 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
}
}
}
}
if
(
!
i
)
{
TRACE
(
"No modes found for format %s (%#x).
\n
"
,
debug_d3dformat
(
format_id
),
format_id
);
return
WINED3DERR_INVALIDCALL
;
}
ModeIdx
=
j
-
1
;
ModeIdx
=
j
-
1
;
/* Now get the display mode via the calculated index */
/* Now get the display mode via the calculated index */
...
...
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