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
2d5b19c1
Commit
2d5b19c1
authored
Sep 09, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Double buffered primary surfaces can only be created in EXLUSIVE mode.
parent
49beec86
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
ddcomimpl.h
dlls/ddraw/ddcomimpl.h
+1
-1
ddraw.c
dlls/ddraw/ddraw.c
+8
-0
ddrawmodes.c
dlls/ddraw/tests/ddrawmodes.c
+15
-0
No files found.
dlls/ddraw/ddcomimpl.h
View file @
2d5b19c1
...
...
@@ -45,7 +45,7 @@
/* Given an object and interface name, returns a pointer to that interface. */
#define ICOM_INTERFACE(implobj, iface) \
(&((implobj)->ICOM_VFIELD_MULTI_NAME(iface)))
(
implobj == NULL ? NULL :
&((implobj)->ICOM_VFIELD_MULTI_NAME(iface)))
#define ICOM_INIT_INTERFACE(implobj, ifacename, vtblname) \
do { \
...
...
dlls/ddraw/ddraw.c
View file @
2d5b19c1
...
...
@@ -2132,6 +2132,14 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
DDSD
->
dwFlags
&=
~
DDSD_LPSURFACE
;
}
if
((
DDSD
->
ddsCaps
.
dwCaps
&
(
DDSCAPS_FLIP
|
DDSCAPS_PRIMARYSURFACE
))
==
(
DDSCAPS_FLIP
|
DDSCAPS_PRIMARYSURFACE
)
&&
!
(
This
->
cooperative_level
&
DDSCL_EXCLUSIVE
))
{
TRACE
(
"(%p): Attempt to create a flipable primary surface without DDSCL_EXCLUSIVE set
\n
"
,
This
);
*
Surf
=
NULL
;
return
DDERR_NOEXCLUSIVEMODE
;
}
if
(
Surf
==
NULL
)
{
FIXME
(
"(%p) You want to get back a surface? Don't give NULL ptrs!
\n
"
,
This
);
...
...
dlls/ddraw/tests/ddrawmodes.c
View file @
2d5b19c1
...
...
@@ -222,6 +222,15 @@ static void testdisplaymodes(void)
static
void
testcooperativelevels_normal
(
void
)
{
HRESULT
rc
;
DDSURFACEDESC
surfacedesc
;
IDirectDrawSurface
*
surface
=
(
IDirectDrawSurface
*
)
0xdeadbeef
;
memset
(
&
surfacedesc
,
0
,
sizeof
(
surfacedesc
));
surfacedesc
.
dwSize
=
sizeof
(
surfacedesc
);
surfacedesc
.
ddpfPixelFormat
.
dwSize
=
sizeof
(
surfacedesc
.
ddpfPixelFormat
);
surfacedesc
.
dwFlags
=
DDSD_CAPS
|
DDSD_BACKBUFFERCOUNT
;
surfacedesc
.
dwBackBufferCount
=
1
;
surfacedesc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
/* Do some tests with DDSCL_NORMAL mode */
...
...
@@ -229,6 +238,12 @@ static void testcooperativelevels_normal(void)
hwnd
,
DDSCL_NORMAL
);
ok
(
rc
==
DD_OK
,
"SetCooperativeLevel(DDSCL_NORMAL) returned: %lx
\n
"
,
rc
);
/* Try creating a double buffered primary in normal mode */
rc
=
IDirectDraw_CreateSurface
(
lpDD
,
&
surfacedesc
,
&
surface
,
NULL
);
ok
(
rc
==
DDERR_NOEXCLUSIVEMODE
,
"IDirectDraw_CreateSurface returned %08lx
\n
"
,
rc
);
ok
(
surface
==
NULL
,
"Returned surface pointer is %p
\n
"
,
surface
);
if
(
surface
)
IDirectDrawSurface_Release
(
surface
);
/* Set the focus window */
rc
=
IDirectDraw_SetCooperativeLevel
(
lpDD
,
hwnd
,
DDSCL_SETFOCUSWINDOW
);
...
...
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