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
c6da3551
Commit
c6da3551
authored
Jul 03, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Make getPixelColor() checks into actual ok() calls.
These should never fail.
parent
f83a66f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
19 deletions
+5
-19
visual.c
dlls/d3d9/tests/visual.c
+5
-19
No files found.
dlls/d3d9/tests/visual.c
View file @
c6da3551
...
...
@@ -141,18 +141,11 @@ static DWORD getPixelColorFromSurface(IDirect3DSurface9 *surface, UINT x, UINT y
D3DLOCKED_RECT
lockedRect
;
hr
=
IDirect3DSurface9_GetDesc
(
surface
,
&
desc
);
if
(
FAILED
(
hr
))
/* This is not a test */
{
trace
(
"Can't get the surface description, hr=%08x
\n
"
,
hr
);
return
0xdeadbeef
;
}
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DSurface9_LockRect
(
surface
,
&
lockedRect
,
&
rectToLock
,
D3DLOCK_READONLY
);
if
(
FAILED
(
hr
))
/* This is not a test */
{
trace
(
"Can't lock the surface, hr=%08x
\n
"
,
hr
);
return
0xdeadbeef
;
}
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
switch
(
desc
.
Format
)
{
case
D3DFMT_A8R8G8B8
:
{
...
...
@@ -165,10 +158,7 @@ static DWORD getPixelColorFromSurface(IDirect3DSurface9 *surface, UINT x, UINT y
break
;
}
hr
=
IDirect3DSurface9_UnlockRect
(
surface
);
if
(
FAILED
(
hr
))
{
trace
(
"Can't unlock the surface, hr=%08x
\n
"
,
hr
);
}
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
return
color
;
}
...
...
@@ -246,11 +236,7 @@ static DWORD getPixelColor(IDirect3DDevice9 *device, UINT x, UINT y)
HRESULT
hr
;
hr
=
IDirect3DDevice9_GetRenderTarget
(
device
,
0
,
&
rt
);
if
(
FAILED
(
hr
))
{
trace
(
"Can't get the render target, hr %#x.
\n
"
,
hr
);
return
0xdeadbeed
;
}
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
get_rt_readback
(
rt
,
&
rb
);
/* Remove the X channel for now. DirectX and OpenGL have different ideas how to treat it apparently, and it isn't
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