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
0885e3f5
Commit
0885e3f5
authored
Feb 01, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Mark surfaces as lost when changing the display mode.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dfead1bf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
8 deletions
+12
-8
ddraw.c
dlls/ddraw/ddraw.c
+4
-0
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+2
-2
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+2
-2
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+2
-2
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+2
-2
No files found.
dlls/ddraw/ddraw.c
View file @
0885e3f5
...
@@ -695,6 +695,8 @@ static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface)
...
@@ -695,6 +695,8 @@ static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface)
if
(
SUCCEEDED
(
hr
=
wined3d_set_adapter_display_mode
(
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
NULL
)))
if
(
SUCCEEDED
(
hr
=
wined3d_set_adapter_display_mode
(
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
NULL
)))
ddraw
->
flags
&=
~
DDRAW_RESTORE_MODE
;
ddraw
->
flags
&=
~
DDRAW_RESTORE_MODE
;
InterlockedCompareExchange
(
&
ddraw
->
device_state
,
DDRAW_DEVICE_STATE_NOT_RESTORED
,
DDRAW_DEVICE_STATE_OK
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
return
hr
;
return
hr
;
...
@@ -1129,6 +1131,8 @@ static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD width, DW
...
@@ -1129,6 +1131,8 @@ static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD width, DW
if
(
SUCCEEDED
(
hr
=
wined3d_set_adapter_display_mode
(
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
&
mode
)))
if
(
SUCCEEDED
(
hr
=
wined3d_set_adapter_display_mode
(
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
&
mode
)))
ddraw
->
flags
|=
DDRAW_RESTORE_MODE
;
ddraw
->
flags
|=
DDRAW_RESTORE_MODE
;
InterlockedCompareExchange
(
&
ddraw
->
device_state
,
DDRAW_DEVICE_STATE_NOT_RESTORED
,
DDRAW_DEVICE_STATE_OK
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
switch
(
hr
)
switch
(
hr
)
...
...
dlls/ddraw/tests/ddraw1.c
View file @
0885e3f5
...
@@ -2783,7 +2783,7 @@ static void test_coop_level_mode_set(void)
...
@@ -2783,7 +2783,7 @@ static void test_coop_level_mode_set(void)
hr
=
IDirectDraw_RestoreDisplayMode
(
ddraw
);
hr
=
IDirectDraw_RestoreDisplayMode
(
ddraw
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface_IsLost
(
primary
);
hr
=
IDirectDrawSurface_IsLost
(
primary
);
todo_wine
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
NULL
;
...
@@ -2946,7 +2946,7 @@ static void test_coop_level_mode_set(void)
...
@@ -2946,7 +2946,7 @@ static void test_coop_level_mode_set(void)
hr
=
IDirectDraw_RestoreDisplayMode
(
ddraw
);
hr
=
IDirectDraw_RestoreDisplayMode
(
ddraw
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface_IsLost
(
primary
);
hr
=
IDirectDrawSurface_IsLost
(
primary
);
todo_wine
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
NULL
;
...
...
dlls/ddraw/tests/ddraw2.c
View file @
0885e3f5
...
@@ -2950,7 +2950,7 @@ static void test_coop_level_mode_set(void)
...
@@ -2950,7 +2950,7 @@ static void test_coop_level_mode_set(void)
hr
=
IDirectDraw_RestoreDisplayMode
(
ddraw
);
hr
=
IDirectDraw_RestoreDisplayMode
(
ddraw
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface_IsLost
(
primary
);
hr
=
IDirectDrawSurface_IsLost
(
primary
);
todo_wine
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
NULL
;
...
@@ -3113,7 +3113,7 @@ static void test_coop_level_mode_set(void)
...
@@ -3113,7 +3113,7 @@ static void test_coop_level_mode_set(void)
hr
=
IDirectDraw2_RestoreDisplayMode
(
ddraw
);
hr
=
IDirectDraw2_RestoreDisplayMode
(
ddraw
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface_IsLost
(
primary
);
hr
=
IDirectDrawSurface_IsLost
(
primary
);
todo_wine
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
NULL
;
...
...
dlls/ddraw/tests/ddraw4.c
View file @
0885e3f5
...
@@ -3086,7 +3086,7 @@ static void test_coop_level_mode_set(void)
...
@@ -3086,7 +3086,7 @@ static void test_coop_level_mode_set(void)
hr
=
IDirectDraw4_RestoreDisplayMode
(
ddraw
);
hr
=
IDirectDraw4_RestoreDisplayMode
(
ddraw
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface4_IsLost
(
primary
);
hr
=
IDirectDrawSurface4_IsLost
(
primary
);
todo_wine
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
NULL
;
...
@@ -3249,7 +3249,7 @@ static void test_coop_level_mode_set(void)
...
@@ -3249,7 +3249,7 @@ static void test_coop_level_mode_set(void)
hr
=
IDirectDraw4_RestoreDisplayMode
(
ddraw
);
hr
=
IDirectDraw4_RestoreDisplayMode
(
ddraw
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface4_IsLost
(
primary
);
hr
=
IDirectDrawSurface4_IsLost
(
primary
);
todo_wine
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
NULL
;
...
...
dlls/ddraw/tests/ddraw7.c
View file @
0885e3f5
...
@@ -2812,7 +2812,7 @@ static void test_coop_level_mode_set(void)
...
@@ -2812,7 +2812,7 @@ static void test_coop_level_mode_set(void)
hr
=
IDirectDraw7_RestoreDisplayMode
(
ddraw
);
hr
=
IDirectDraw7_RestoreDisplayMode
(
ddraw
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_IsLost
(
primary
);
hr
=
IDirectDrawSurface7_IsLost
(
primary
);
todo_wine
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
NULL
;
...
@@ -2975,7 +2975,7 @@ static void test_coop_level_mode_set(void)
...
@@ -2975,7 +2975,7 @@ static void test_coop_level_mode_set(void)
hr
=
IDirectDraw7_RestoreDisplayMode
(
ddraw
);
hr
=
IDirectDraw7_RestoreDisplayMode
(
ddraw
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_IsLost
(
primary
);
hr
=
IDirectDrawSurface7_IsLost
(
primary
);
todo_wine
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_SURFACELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
ok
(
!
expect_messages
->
message
,
"Expected message %#x, but didn't receive it.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
expect_messages
=
NULL
;
...
...
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