Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6e0d056e
Commit
6e0d056e
authored
Sep 22, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Use sizeof instead of a magic number.
parent
000258a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
visual.c
dlls/ddraw/tests/visual.c
+15
-15
No files found.
dlls/ddraw/tests/visual.c
View file @
6e0d056e
...
...
@@ -1453,7 +1453,7 @@ static void D3D1_TextureMapBlendTest(void)
memcpy
(
exdesc
.
lpData
,
test1_quads
,
sizeof
(
test1_quads
));
exe_buffer_ptr
=
256
+
(
char
*
)
exdesc
.
lpData
;
exe_buffer_ptr
=
sizeof
(
test1_quads
)
+
(
char
*
)
exdesc
.
lpData
;
EXEBUF_PUT_PROCESSVERTICES
(
8
,
exe_buffer_ptr
);
...
...
@@ -1478,7 +1478,7 @@ static void D3D1_TextureMapBlendTest(void)
EXEBUF_END
(
exe_buffer_ptr
);
exe_length
=
((
char
*
)
exe_buffer_ptr
-
(
char
*
)
exdesc
.
lpData
)
-
256
;
exe_length
=
((
char
*
)
exe_buffer_ptr
-
(
char
*
)
exdesc
.
lpData
)
-
sizeof
(
test1_quads
)
;
hr
=
IDirect3DExecuteBuffer_Unlock
(
ExecuteBuffer
);
if
(
FAILED
(
hr
))
{
...
...
@@ -1488,7 +1488,7 @@ static void D3D1_TextureMapBlendTest(void)
memset
(
&
exdata
,
0
,
sizeof
(
D3DEXECUTEDATA
));
exdata
.
dwSize
=
sizeof
(
D3DEXECUTEDATA
);
exdata
.
dwVertexCount
=
8
;
exdata
.
dwInstructionOffset
=
256
;
exdata
.
dwInstructionOffset
=
sizeof
(
test1_quads
)
;
exdata
.
dwInstructionLength
=
exe_length
;
hr
=
IDirect3DExecuteBuffer_SetExecuteData
(
ExecuteBuffer
,
&
exdata
);
ok
(
hr
==
D3D_OK
,
"IDirect3DExecuteBuffer_SetExecuteData failed with %08x
\n
"
,
hr
);
...
...
@@ -1585,7 +1585,7 @@ static void D3D1_TextureMapBlendTest(void)
memcpy
(
exdesc
.
lpData
,
test1_quads
,
sizeof
(
test1_quads
));
exe_buffer_ptr
=
256
+
(
char
*
)
exdesc
.
lpData
;
exe_buffer_ptr
=
sizeof
(
test1_quads
)
+
(
char
*
)
exdesc
.
lpData
;
EXEBUF_PUT_PROCESSVERTICES
(
8
,
exe_buffer_ptr
);
...
...
@@ -1599,7 +1599,7 @@ static void D3D1_TextureMapBlendTest(void)
EXEBUF_END
(
exe_buffer_ptr
);
exe_length
=
((
char
*
)
exe_buffer_ptr
-
(
char
*
)
exdesc
.
lpData
)
-
256
;
exe_length
=
((
char
*
)
exe_buffer_ptr
-
(
char
*
)
exdesc
.
lpData
)
-
sizeof
(
test1_quads
)
;
hr
=
IDirect3DExecuteBuffer_Unlock
(
ExecuteBuffer
);
if
(
FAILED
(
hr
))
{
...
...
@@ -1609,7 +1609,7 @@ static void D3D1_TextureMapBlendTest(void)
memset
(
&
exdata
,
0
,
sizeof
(
D3DEXECUTEDATA
));
exdata
.
dwSize
=
sizeof
(
D3DEXECUTEDATA
);
exdata
.
dwVertexCount
=
8
;
exdata
.
dwInstructionOffset
=
256
;
exdata
.
dwInstructionOffset
=
sizeof
(
test1_quads
)
;
exdata
.
dwInstructionLength
=
exe_length
;
hr
=
IDirect3DExecuteBuffer_SetExecuteData
(
ExecuteBuffer
,
&
exdata
);
ok
(
hr
==
D3D_OK
,
"IDirect3DExecuteBuffer_SetExecuteData failed with %08x
\n
"
,
hr
);
...
...
@@ -1706,7 +1706,7 @@ static void D3D1_TextureMapBlendTest(void)
memcpy
(
exdesc
.
lpData
,
test2_quads
,
sizeof
(
test2_quads
));
exe_buffer_ptr
=
256
+
(
char
*
)
exdesc
.
lpData
;
exe_buffer_ptr
=
sizeof
(
test2_quads
)
+
(
char
*
)
exdesc
.
lpData
;
EXEBUF_PUT_PROCESSVERTICES
(
8
,
exe_buffer_ptr
);
...
...
@@ -1721,7 +1721,7 @@ static void D3D1_TextureMapBlendTest(void)
EXEBUF_END
(
exe_buffer_ptr
);
exe_length
=
((
char
*
)
exe_buffer_ptr
-
(
char
*
)
exdesc
.
lpData
)
-
256
;
exe_length
=
((
char
*
)
exe_buffer_ptr
-
(
char
*
)
exdesc
.
lpData
)
-
sizeof
(
test2_quads
)
;
hr
=
IDirect3DExecuteBuffer_Unlock
(
ExecuteBuffer
);
if
(
FAILED
(
hr
))
{
...
...
@@ -1731,7 +1731,7 @@ static void D3D1_TextureMapBlendTest(void)
memset
(
&
exdata
,
0
,
sizeof
(
D3DEXECUTEDATA
));
exdata
.
dwSize
=
sizeof
(
D3DEXECUTEDATA
);
exdata
.
dwVertexCount
=
8
;
exdata
.
dwInstructionOffset
=
256
;
exdata
.
dwInstructionOffset
=
sizeof
(
test2_quads
)
;
exdata
.
dwInstructionLength
=
exe_length
;
hr
=
IDirect3DExecuteBuffer_SetExecuteData
(
ExecuteBuffer
,
&
exdata
);
ok
(
hr
==
D3D_OK
,
"IDirect3DExecuteBuffer_SetExecuteData failed with %08x
\n
"
,
hr
);
...
...
@@ -1832,7 +1832,7 @@ static void D3D1_TextureMapBlendTest(void)
memcpy
(
exdesc
.
lpData
,
test1_quads
,
sizeof
(
test1_quads
));
exe_buffer_ptr
=
256
+
(
char
*
)
exdesc
.
lpData
;
exe_buffer_ptr
=
sizeof
(
test1_quads
)
+
(
char
*
)
exdesc
.
lpData
;
EXEBUF_PUT_PROCESSVERTICES
(
8
,
exe_buffer_ptr
);
...
...
@@ -1847,7 +1847,7 @@ static void D3D1_TextureMapBlendTest(void)
EXEBUF_END
(
exe_buffer_ptr
);
exe_length
=
((
char
*
)
exe_buffer_ptr
-
(
char
*
)
exdesc
.
lpData
)
-
256
;
exe_length
=
((
char
*
)
exe_buffer_ptr
-
(
char
*
)
exdesc
.
lpData
)
-
sizeof
(
test1_quads
)
;
hr
=
IDirect3DExecuteBuffer_Unlock
(
ExecuteBuffer
);
if
(
FAILED
(
hr
))
{
...
...
@@ -1857,7 +1857,7 @@ static void D3D1_TextureMapBlendTest(void)
memset
(
&
exdata
,
0
,
sizeof
(
D3DEXECUTEDATA
));
exdata
.
dwSize
=
sizeof
(
D3DEXECUTEDATA
);
exdata
.
dwVertexCount
=
8
;
exdata
.
dwInstructionOffset
=
256
;
exdata
.
dwInstructionOffset
=
sizeof
(
test1_quads
)
;
exdata
.
dwInstructionLength
=
exe_length
;
hr
=
IDirect3DExecuteBuffer_SetExecuteData
(
ExecuteBuffer
,
&
exdata
);
ok
(
hr
==
D3D_OK
,
"IDirect3DExecuteBuffer_SetExecuteData failed with %08x
\n
"
,
hr
);
...
...
@@ -1970,7 +1970,7 @@ static void D3D1_TextureMapBlendTest(void)
memcpy
(
exdesc
.
lpData
,
test1_quads
,
sizeof
(
test1_quads
));
exe_buffer_ptr
=
256
+
(
char
*
)
exdesc
.
lpData
;
exe_buffer_ptr
=
sizeof
(
test1_quads
)
+
(
char
*
)
exdesc
.
lpData
;
EXEBUF_PUT_PROCESSVERTICES
(
8
,
exe_buffer_ptr
);
...
...
@@ -1985,7 +1985,7 @@ static void D3D1_TextureMapBlendTest(void)
EXEBUF_END
(
exe_buffer_ptr
);
exe_length
=
((
char
*
)
exe_buffer_ptr
-
(
char
*
)
exdesc
.
lpData
)
-
256
;
exe_length
=
((
char
*
)
exe_buffer_ptr
-
(
char
*
)
exdesc
.
lpData
)
-
sizeof
(
test1_quads
)
;
hr
=
IDirect3DExecuteBuffer_Unlock
(
ExecuteBuffer
);
if
(
FAILED
(
hr
))
{
...
...
@@ -1995,7 +1995,7 @@ static void D3D1_TextureMapBlendTest(void)
memset
(
&
exdata
,
0
,
sizeof
(
D3DEXECUTEDATA
));
exdata
.
dwSize
=
sizeof
(
D3DEXECUTEDATA
);
exdata
.
dwVertexCount
=
8
;
exdata
.
dwInstructionOffset
=
256
;
exdata
.
dwInstructionOffset
=
sizeof
(
test1_quads
)
;
exdata
.
dwInstructionLength
=
exe_length
;
hr
=
IDirect3DExecuteBuffer_SetExecuteData
(
ExecuteBuffer
,
&
exdata
);
ok
(
hr
==
D3D_OK
,
"IDirect3DExecuteBuffer_SetExecuteData failed with %08x
\n
"
,
hr
);
...
...
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