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
40c2fc21
Commit
40c2fc21
authored
Nov 03, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Check if the current display settings match the registry settings.
parent
e1601622
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
21 deletions
+31
-21
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+31
-21
device.c
dlls/d3d9/tests/device.c
+0
-0
No files found.
dlls/d3d9/tests/d3d9ex.c
View file @
40c2fc21
...
...
@@ -27,7 +27,7 @@
#include <d3d9.h>
static
HMODULE
d3d9_handle
=
0
;
static
DEVMODEW
startup
_mode
;
static
DEVMODEW
registry
_mode
;
static
HRESULT
(
WINAPI
*
pDirect3DCreate9Ex
)(
UINT
SDKVersion
,
IDirect3D9Ex
**
d3d9ex
);
...
...
@@ -1744,8 +1744,8 @@ static DWORD WINAPI wndproc_thread(void *param)
BOOL
ret
;
p
->
dummy_window
=
CreateWindowA
(
"d3d9_test_wndproc_wc"
,
"d3d9_test"
,
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
startup
_mode
.
dmPelsWidth
,
startup
_mode
.
dmPelsHeight
,
0
,
0
,
0
,
0
);
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
registry
_mode
.
dmPelsWidth
,
registry
_mode
.
dmPelsHeight
,
0
,
0
,
0
,
0
);
p
->
running_in_foreground
=
SetForegroundWindow
(
p
->
dummy_window
);
ret
=
SetEvent
(
p
->
window_created
);
...
...
@@ -1802,11 +1802,11 @@ static void test_wndproc(void)
ok
(
!!
thread_params
.
test_finished
,
"CreateEvent failed, last error %#x.
\n
"
,
GetLastError
());
focus_window
=
CreateWindowA
(
"d3d9_test_wndproc_wc"
,
"d3d9_test"
,
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
startup
_mode
.
dmPelsWidth
,
startup
_mode
.
dmPelsHeight
,
0
,
0
,
0
,
0
);
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
registry
_mode
.
dmPelsWidth
,
registry
_mode
.
dmPelsHeight
,
0
,
0
,
0
,
0
);
device_window
=
CreateWindowA
(
"d3d9_test_wndproc_wc"
,
"d3d9_test"
,
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
startup
_mode
.
dmPelsWidth
,
startup
_mode
.
dmPelsHeight
,
0
,
0
,
0
,
0
);
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
registry
_mode
.
dmPelsWidth
,
registry
_mode
.
dmPelsHeight
,
0
,
0
,
0
,
0
);
thread
=
CreateThread
(
NULL
,
0
,
wndproc_thread
,
&
thread_params
,
0
,
&
tid
);
ok
(
!!
thread
,
"Failed to create thread, last error %#x.
\n
"
,
GetLastError
());
...
...
@@ -1839,8 +1839,8 @@ static void test_wndproc(void)
expect_messages
=
messages
;
device_desc
.
device_window
=
device_window
;
device_desc
.
width
=
startup
_mode
.
dmPelsWidth
;
device_desc
.
height
=
startup
_mode
.
dmPelsHeight
;
device_desc
.
width
=
registry
_mode
.
dmPelsWidth
;
device_desc
.
height
=
registry
_mode
.
dmPelsHeight
;
device_desc
.
flags
=
CREATE_DEVICE_FULLSCREEN
;
if
(
!
(
device
=
create_device
(
focus_window
,
&
device_desc
)))
{
...
...
@@ -1944,11 +1944,11 @@ static void test_wndproc_windowed(void)
ok
(
!!
thread_params
.
test_finished
,
"CreateEvent failed, last error %#x.
\n
"
,
GetLastError
());
focus_window
=
CreateWindowA
(
"d3d9_test_wndproc_wc"
,
"d3d9_test"
,
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
startup
_mode
.
dmPelsWidth
,
startup
_mode
.
dmPelsHeight
,
0
,
0
,
0
,
0
);
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
registry
_mode
.
dmPelsWidth
,
registry
_mode
.
dmPelsHeight
,
0
,
0
,
0
,
0
);
device_window
=
CreateWindowA
(
"d3d9_test_wndproc_wc"
,
"d3d9_test"
,
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
startup
_mode
.
dmPelsWidth
,
startup
_mode
.
dmPelsHeight
,
0
,
0
,
0
,
0
);
WS_MAXIMIZE
|
WS_VISIBLE
|
WS_CAPTION
,
0
,
0
,
registry
_mode
.
dmPelsWidth
,
registry
_mode
.
dmPelsHeight
,
0
,
0
,
0
,
0
);
thread
=
CreateThread
(
NULL
,
0
,
wndproc_thread
,
&
thread_params
,
0
,
&
tid
);
ok
(
!!
thread
,
"Failed to create thread, last error %#x.
\n
"
,
GetLastError
());
...
...
@@ -2143,14 +2143,14 @@ static void test_window_style(void)
};
unsigned
int
i
;
SetRect
(
&
fullscreen_rect
,
0
,
0
,
startup_mode
.
dmPelsWidth
,
startup
_mode
.
dmPelsHeight
);
SetRect
(
&
fullscreen_rect
,
0
,
0
,
registry_mode
.
dmPelsWidth
,
registry
_mode
.
dmPelsHeight
);
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
*
tests
);
++
i
)
{
focus_window
=
CreateWindowA
(
"d3d9_test_wc"
,
"d3d9_test"
,
WS_OVERLAPPEDWINDOW
|
tests
[
i
].
style_flags
,
0
,
0
,
startup_mode
.
dmPelsWidth
/
2
,
startup
_mode
.
dmPelsHeight
/
2
,
0
,
0
,
0
,
0
);
0
,
0
,
registry_mode
.
dmPelsWidth
/
2
,
registry
_mode
.
dmPelsHeight
/
2
,
0
,
0
,
0
,
0
);
device_window
=
CreateWindowA
(
"d3d9_test_wc"
,
"d3d9_test"
,
WS_OVERLAPPEDWINDOW
|
tests
[
i
].
style_flags
,
0
,
0
,
startup_mode
.
dmPelsWidth
/
2
,
startup
_mode
.
dmPelsHeight
/
2
,
0
,
0
,
0
,
0
);
0
,
0
,
registry_mode
.
dmPelsWidth
/
2
,
registry
_mode
.
dmPelsHeight
/
2
,
0
,
0
,
0
,
0
);
device_style
=
GetWindowLongA
(
device_window
,
GWL_STYLE
);
device_exstyle
=
GetWindowLongA
(
device_window
,
GWL_EXSTYLE
);
...
...
@@ -2161,8 +2161,8 @@ static void test_window_style(void)
GetWindowRect
(
device_window
,
&
device_rect
);
device_desc
.
device_window
=
device_window
;
device_desc
.
width
=
startup
_mode
.
dmPelsWidth
;
device_desc
.
height
=
startup
_mode
.
dmPelsHeight
;
device_desc
.
width
=
registry
_mode
.
dmPelsWidth
;
device_desc
.
height
=
registry
_mode
.
dmPelsHeight
;
device_desc
.
flags
=
CREATE_DEVICE_FULLSCREEN
|
tests
[
i
].
device_flags
;
if
(
!
(
device
=
create_device
(
focus_window
,
&
device_desc
)))
{
...
...
@@ -2233,6 +2233,8 @@ static void test_window_style(void)
START_TEST
(
d3d9ex
)
{
DEVMODEW
current_mode
;
d3d9_handle
=
LoadLibraryA
(
"d3d9.dll"
);
if
(
!
d3d9_handle
)
{
...
...
@@ -2246,9 +2248,17 @@ START_TEST(d3d9ex)
return
;
}
startup_mode
.
dmSize
=
sizeof
(
startup_mode
);
ok
(
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
startup_mode
),
"Failed to get display mode.
\n
"
);
memset
(
&
current_mode
,
0
,
sizeof
(
current_mode
));
current_mode
.
dmSize
=
sizeof
(
current_mode
);
ok
(
EnumDisplaySettingsW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
current_mode
),
"Failed to get display mode.
\n
"
);
registry_mode
.
dmSize
=
sizeof
(
registry_mode
);
ok
(
EnumDisplaySettingsW
(
NULL
,
ENUM_REGISTRY_SETTINGS
,
&
registry_mode
),
"Failed to get display mode.
\n
"
);
if
(
current_mode
.
dmPelsWidth
!=
registry_mode
.
dmPelsWidth
||
current_mode
.
dmPelsHeight
!=
registry_mode
.
dmPelsHeight
)
{
skip
(
"Current mode does not match registry mode, skipping test.
\n
"
);
return
;
}
test_qi_base_to_ex
();
test_qi_ex_to_base
();
...
...
dlls/d3d9/tests/device.c
View file @
40c2fc21
This diff is collapsed.
Click to expand it.
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