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
2a0463ac
Commit
2a0463ac
authored
Jun 20, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Only filter redundant mode changes in wined3d.
parent
62d6b24e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
16 deletions
+14
-16
ddraw.c
dlls/ddraw/ddraw.c
+0
-14
device.c
dlls/wined3d/device.c
+14
-2
No files found.
dlls/ddraw/ddraw.c
View file @
2a0463ac
...
...
@@ -1061,20 +1061,6 @@ static HRESULT ddraw_set_display_mode(struct ddraw *ddraw, DWORD Width, DWORD He
default:
format
=
WINED3DFMT_UNKNOWN
;
break
;
}
if
(
FAILED
(
hr
=
wined3d_device_get_display_mode
(
ddraw
->
wined3d_device
,
0
,
&
mode
)))
{
ERR
(
"Failed to get current display mode, hr %#x.
\n
"
,
hr
);
}
else
if
(
mode
.
width
==
Width
&&
mode
.
height
==
Height
&&
mode
.
format_id
==
format
&&
mode
.
refresh_rate
==
RefreshRate
)
{
TRACE
(
"Skipping redundant mode setting call.
\n
"
);
wined3d_mutex_unlock
();
return
DD_OK
;
}
/* Check the exclusive mode
if(!(ddraw->cooperative_level & DDSCL_EXCLUSIVE))
return DDERR_NOEXCLUSIVEMODE;
...
...
dlls/wined3d/device.c
View file @
2a0463ac
...
...
@@ -1567,9 +1567,11 @@ HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device,
{
struct
wined3d_adapter
*
adapter
=
device
->
adapter
;
const
struct
wined3d_format
*
format
=
wined3d_get_format
(
&
adapter
->
gl_info
,
mode
->
format_id
);
struct
wined3d_display_mode
current_mode
;
DEVMODEW
devmode
;
LONG
ret
;
RECT
clip_rc
;
HRESULT
hr
;
TRACE
(
"device %p, swapchain_idx %u, mode %p (%ux%u@%u %s).
\n
"
,
device
,
swapchain_idx
,
mode
,
mode
->
width
,
mode
->
height
,
mode
->
refresh_rate
,
debug_d3dformat
(
mode
->
format_id
));
...
...
@@ -1592,9 +1594,19 @@ HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device,
devmode
.
dmFields
|=
DM_DISPLAYFREQUENCY
;
/* Only change the mode if necessary */
if
(
adapter
->
screen_size
.
cx
==
mode
->
width
&&
adapter
->
screen_size
.
cy
==
mode
->
height
&&
adapter
->
screen_format
==
mode
->
format_id
&&
!
mode
->
refresh_rate
)
if
(
FAILED
(
hr
=
wined3d_device_get_display_mode
(
device
,
swapchain_idx
,
&
current_mode
)))
{
ERR
(
"Failed to get current display mode, hr %#x.
\n
"
,
hr
);
}
else
if
(
current_mode
.
width
==
mode
->
width
&&
current_mode
.
height
==
mode
->
height
&&
current_mode
.
format_id
==
mode
->
format_id
&&
(
current_mode
.
refresh_rate
==
mode
->
refresh_rate
||
!
mode
->
refresh_rate
))
{
TRACE
(
"Skipping redundant mode setting call.
\n
"
);
return
WINED3D_OK
;
}
ret
=
ChangeDisplaySettingsExW
(
NULL
,
&
devmode
,
NULL
,
CDS_FULLSCREEN
,
NULL
);
if
(
ret
!=
DISP_CHANGE_SUCCESSFUL
)
...
...
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