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
0a90271d
Commit
0a90271d
authored
Oct 22, 2010
by
David Adam
Committed by
Alexandre Julliard
Oct 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: SETFOCUSWINDOW lives independently of other flags.
parent
1a7300b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
ddraw.c
dlls/ddraw/ddraw.c
+14
-10
ddrawmodes.c
dlls/ddraw/tests/ddrawmodes.c
+7
-0
No files found.
dlls/ddraw/ddraw.c
View file @
0a90271d
...
...
@@ -586,21 +586,23 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd,
if
(
cooplevel
&
DDSCL_SETFOCUSWINDOW
)
{
/* This isn't compatible with a lot of flags */
if
(
cooplevel
&
(
DDSCL_MULTITHREADED
|
DDSCL_FPUSETUP
|
DDSCL_FPUPRESERVE
|
DDSCL_ALLOWREBOOT
|
DDSCL_ALLOWMODEX
|
DDSCL_SETDEVICEWINDOW
|
DDSCL_NORMAL
|
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
)
)
if
(
cooplevel
&
(
DDSCL_MULTITHREADED
|
DDSCL_CREATEDEVICEWINDOW
|
DDSCL_FPUSETUP
|
DDSCL_FPUPRESERVE
|
DDSCL_ALLOWREBOOT
|
DDSCL_ALLOWMODEX
|
DDSCL_SETDEVICEWINDOW
|
DDSCL_NORMAL
|
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
)
)
{
TRACE
(
"Called with incompatible flags, returning DDERR_INVALIDPARAMS
\n
"
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
DDERR_INVALIDPARAMS
;
}
else
if
(
(
This
->
cooperative_level
&
DDSCL_FULLSCREEN
)
&&
window
)
if
(
(
This
->
cooperative_level
&
DDSCL_FULLSCREEN
)
&&
window
)
{
TRACE
(
"Setting DDSCL_SETFOCUSWINDOW with an already set window, returning DDERR_HWNDALREADYSET
\n
"
);
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -620,6 +622,8 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd,
DestroyWindow
(
This
->
devicewindow
);
This
->
devicewindow
=
NULL
;
}
return
DD_OK
;
}
/* DDSCL_NORMAL or DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE */
if
(
cooplevel
&
DDSCL_NORMAL
)
...
...
dlls/ddraw/tests/ddrawmodes.c
View file @
0a90271d
...
...
@@ -557,6 +557,9 @@ static void testcooperativelevels_normal(void)
surfacedesc
.
dwBackBufferCount
=
1
;
surfacedesc
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_COMPLEX
|
DDSCAPS_FLIP
;
rc
=
IDirectDraw_SetCooperativeLevel
(
lpDD
,
hwnd
,
DDSCL_SETFOCUSWINDOW
|
DDSCL_CREATEDEVICEWINDOW
);
ok
(
rc
==
DDERR_INVALIDPARAMS
,
"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW) returned: %x
\n
"
,
rc
);
/* Do some tests with DDSCL_NORMAL mode */
/* Fullscreen mode + normal mode + exclusive mode */
rc
=
IDirectDraw_SetCooperativeLevel
(
lpDD
,
hwnd
,
DDSCL_FULLSCREEN
|
DDSCL_EXCLUSIVE
|
DDSCL_NORMAL
);
...
...
@@ -604,6 +607,10 @@ static void testcooperativelevels_normal(void)
if
(
surface
&&
surface
!=
(
IDirectDrawSurface
*
)
0xdeadbeef
)
IDirectDrawSurface_Release
(
surface
);
/* Set the focus window */
rc
=
IDirectDraw_SetCooperativeLevel
(
lpDD
,
hwnd
,
DDSCL_SETFOCUSWINDOW
|
DDSCL_CREATEDEVICEWINDOW
);
ok
(
rc
==
DDERR_INVALIDPARAMS
,
"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW) returned: %x
\n
"
,
rc
);
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