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
74e3f516
Commit
74e3f516
authored
Dec 04, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Attach the first surface in the swap chain to the last one.
parent
ab8d59c2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
23 deletions
+24
-23
surface.c
dlls/ddraw/surface.c
+12
-7
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+3
-4
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+3
-4
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+3
-4
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+3
-4
No files found.
dlls/ddraw/surface.c
View file @
74e3f516
...
...
@@ -469,7 +469,8 @@ static void ddraw_surface_cleanup(struct ddraw_surface *surface)
surf
=
surface
->
complex_array
[
i
];
surface
->
complex_array
[
i
]
=
NULL
;
ddraw_surface_cleanup
(
surf
);
if
(
!
surf
->
is_complex_root
)
ddraw_surface_cleanup
(
surf
);
}
if
(
surface
->
device1
)
...
...
@@ -4724,19 +4725,22 @@ static HRESULT WINAPI ddraw_surface7_SetPalette(IDirectDrawSurface7 *iface, IDir
DDSCAPS2
caps2
=
{
DDSCAPS_FLIP
,
0
,
0
,
0
};
surf
=
This
;
while
(
1
)
for
(;;
)
{
IDirectDrawSurface7
*
attach
;
HRESULT
hr
;
hr
=
ddraw_surface7_GetAttachedSurface
(
&
surf
->
IDirectDrawSurface7_iface
,
&
caps2
,
&
attach
);
if
(
hr
!=
DD_OK
)
if
(
FAILED
(
hr
=
ddraw_surface7_GetAttachedSurface
(
&
surf
->
IDirectDrawSurface7_iface
,
&
caps2
,
&
attach
)))
break
;
surf
=
impl_from_IDirectDrawSurface7
(
attach
);
if
(
surf
==
This
)
{
ddraw_surface7_Release
(
attach
);
break
;
}
TRACE
(
"Setting palette on %p
\n
"
,
attach
);
TRACE
(
"Setting palette on %p
.
\n
"
,
attach
);
ddraw_surface7_SetPalette
(
attach
,
Pal
);
surf
=
impl_from_IDirectDrawSurface7
(
attach
);
ddraw_surface7_Release
(
attach
);
}
}
...
...
@@ -6002,6 +6006,7 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
*
attach
=
last
;
attach
=
&
last
->
complex_array
[
0
];
}
*
attach
=
root
;
}
if
(
surface_desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
...
...
dlls/ddraw/tests/ddraw1.c
View file @
74e3f516
...
...
@@ -3605,10 +3605,9 @@ static void test_flip(void)
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
hr
=
IDirectDrawSurface_GetAttachedSurface
(
backbuffer3
,
&
caps
,
&
surface
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to get attached surface, hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
surface
==
primary
,
"Got unexpected surface %p, expected %p.
\n
"
,
surface
,
primary
);
if
(
surface
)
IDirectDrawSurface_Release
(
surface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get attached surface, hr %#x.
\n
"
,
hr
);
ok
(
surface
==
primary
,
"Got unexpected surface %p, expected %p.
\n
"
,
surface
,
primary
);
IDirectDrawSurface_Release
(
surface
);
memset
(
&
surface_desc
,
0
,
sizeof
(
surface_desc
));
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
...
...
dlls/ddraw/tests/ddraw2.c
View file @
74e3f516
...
...
@@ -4286,10 +4286,9 @@ static void test_flip(void)
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
hr
=
IDirectDrawSurface_GetAttachedSurface
(
backbuffer3
,
&
caps
,
&
surface
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to get attached surface, hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
surface
==
primary
,
"Got unexpected surface %p, expected %p.
\n
"
,
surface
,
primary
);
if
(
surface
)
IDirectDrawSurface_Release
(
surface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get attached surface, hr %#x.
\n
"
,
hr
);
ok
(
surface
==
primary
,
"Got unexpected surface %p, expected %p.
\n
"
,
surface
,
primary
);
IDirectDrawSurface_Release
(
surface
);
memset
(
&
surface_desc
,
0
,
sizeof
(
surface_desc
));
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
74e3f516
...
...
@@ -4890,10 +4890,9 @@ static void test_flip(void)
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
hr
=
IDirectDrawSurface4_GetAttachedSurface
(
backbuffer3
,
&
caps
,
&
surface
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to get attached surface, hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
surface
==
primary
,
"Got unexpected surface %p, expected %p.
\n
"
,
surface
,
primary
);
if
(
surface
)
IDirectDrawSurface4_Release
(
surface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get attached surface, hr %#x.
\n
"
,
hr
);
ok
(
surface
==
primary
,
"Got unexpected surface %p, expected %p.
\n
"
,
surface
,
primary
);
IDirectDrawSurface4_Release
(
surface
);
memset
(
&
surface_desc
,
0
,
sizeof
(
surface_desc
));
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
74e3f516
...
...
@@ -4777,10 +4777,9 @@ static void test_flip(void)
"Got unexpected caps %#x.
\n
"
,
surface_desc
.
ddsCaps
.
dwCaps
);
hr
=
IDirectDrawSurface7_GetAttachedSurface
(
backbuffer3
,
&
caps
,
&
surface
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to get attached surface, hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
surface
==
primary
,
"Got unexpected surface %p, expected %p.
\n
"
,
surface
,
primary
);
if
(
surface
)
IDirectDrawSurface7_Release
(
surface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get attached surface, hr %#x.
\n
"
,
hr
);
ok
(
surface
==
primary
,
"Got unexpected surface %p, expected %p.
\n
"
,
surface
,
primary
);
IDirectDrawSurface7_Release
(
surface
);
memset
(
&
surface_desc
,
0
,
sizeof
(
surface_desc
));
surface_desc
.
dwSize
=
sizeof
(
surface_desc
);
...
...
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