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
1772a043
Commit
1772a043
authored
May 03, 2011
by
John Edmonds
Committed by
Alexandre Julliard
May 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Added a test for resetting an invisible, inactive window to fullscreen mode.
parent
35bff043
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
device.c
dlls/d3d9/tests/device.c
+58
-0
No files found.
dlls/d3d9/tests/device.c
View file @
1772a043
...
...
@@ -2814,6 +2814,63 @@ done:
UnregisterClassA
(
"d3d9_test_wndproc_wc"
,
GetModuleHandleA
(
NULL
));
}
static
void
test_reset_fullscreen
(
void
)
{
WNDCLASSEX
wc
=
{
0
};
IDirect3DDevice9
*
device
=
NULL
;
IDirect3D9
*
d3d
=
NULL
;
static
const
struct
message
messages
[]
=
{
{
WM_ACTIVATEAPP
,
FOCUS_WINDOW
},
{
0
,
0
},
};
d3d
=
pDirect3DCreate9
(
D3D_SDK_VERSION
);
ok
(
d3d
!=
NULL
,
"Failed to create an IDirect3D object.
\n
"
);
expect_messages
=
messages
;
wc
.
cbSize
=
sizeof
(
WNDCLASSEX
);
wc
.
lpfnWndProc
=
test_proc
;
wc
.
lpszClassName
=
"test_reset_fullscreen"
;
ok
(
RegisterClassEx
(
&
wc
),
"Failed to register a new window class. GetLastError:%d
\n
"
,
GetLastError
());
device_window
=
focus_window
=
CreateWindowEx
(
0
,
wc
.
lpszClassName
,
"Test Reset Fullscreen"
,
0
,
0
,
0
,
screen_width
,
screen_height
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
device_window
!=
NULL
,
"Failed to create a window. GetLastError:%d
\n
"
,
GetLastError
());
/*
* Create a device in windowed mode.
* Since the device is windowed and we haven't called any methods that
* could show the window (such as ShowWindow or SetWindowPos) yet,
* WM_ACTIVATEAPP will not have been sent.
*/
device
=
create_device
(
d3d
,
device_window
,
focus_window
,
TRUE
);
if
(
!
device
)
{
skip
(
"Unable to create device. Skipping test."
);
goto
cleanup
;
}
/*
* Switch to fullscreen mode.
* This will force the window to be shown and will cause the WM_ACTIVATEAPP
* message to be sent.
*/
ok
(
SUCCEEDED
(
reset_device
(
device
,
device_window
,
FALSE
)),
"Failed to reset device.
\n
"
);
flush_events
();
todo_wine
ok
(
expect_messages
->
message
==
0
,
"Expected to receive message %#x.
\n
"
,
expect_messages
->
message
);
expect_messages
=
NULL
;
cleanup:
if
(
device
)
IDirect3DDevice9_Release
(
device
);
if
(
d3d
)
IDirect3D9_Release
(
d3d
);
DestroyWindow
(
device_window
);
device_window
=
focus_window
=
NULL
;
UnregisterClass
(
wc
.
lpszClassName
,
GetModuleHandle
(
NULL
));
}
static
inline
void
set_fpu_cw
(
WORD
cw
)
{
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
...
...
@@ -3007,6 +3064,7 @@ START_TEST(device)
test_mipmap_levels
();
test_checkdevicemultisampletype
();
test_cursor
();
test_reset_fullscreen
();
test_reset
();
test_scene
();
test_limits
();
...
...
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