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
54960cd8
Commit
54960cd8
authored
Jun 02, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f10136a9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
opengl.c
dlls/opengl32/tests/opengl.c
+9
-11
No files found.
dlls/opengl32/tests/opengl.c
View file @
54960cd8
...
...
@@ -525,7 +525,7 @@ static void test_colorbits(HDC hdc)
{
const
int
iAttribList
[]
=
{
WGL_COLOR_BITS_ARB
,
WGL_RED_BITS_ARB
,
WGL_GREEN_BITS_ARB
,
WGL_BLUE_BITS_ARB
,
WGL_ALPHA_BITS_ARB
};
int
iAttribRet
[
sizeof
(
iAttribList
)
/
sizeof
(
iAttribList
[
0
]
)];
int
iAttribRet
[
ARRAY_SIZE
(
iAttribList
)];
const
int
iAttribs
[]
=
{
WGL_ALPHA_BITS_ARB
,
1
,
0
};
unsigned
int
nFormats
;
BOOL
res
;
...
...
@@ -545,8 +545,8 @@ static void test_colorbits(HDC hdc)
return
;
}
res
=
pwglGetPixelFormatAttribivARB
(
hdc
,
iPixelFormat
,
0
,
sizeof
(
iAttribList
)
/
sizeof
(
iAttribList
[
0
]),
iAttribList
,
iAttribRet
);
res
=
pwglGetPixelFormatAttribivARB
(
hdc
,
iPixelFormat
,
0
,
ARRAY_SIZE
(
iAttribList
),
iAttribList
,
iAttribRet
);
if
(
res
==
FALSE
)
{
skip
(
"wglGetPixelFormatAttribivARB failed
\n
"
);
...
...
@@ -560,7 +560,7 @@ static void test_colorbits(HDC hdc)
static
void
test_gdi_dbuf
(
HDC
hdc
)
{
const
int
iAttribList
[]
=
{
WGL_SUPPORT_GDI_ARB
,
WGL_DOUBLE_BUFFER_ARB
};
int
iAttribRet
[
sizeof
(
iAttribList
)
/
sizeof
(
iAttribList
[
0
]
)];
int
iAttribRet
[
ARRAY_SIZE
(
iAttribList
)];
unsigned
int
nFormats
;
int
iPixelFormat
;
BOOL
res
;
...
...
@@ -574,9 +574,8 @@ static void test_gdi_dbuf(HDC hdc)
nFormats
=
DescribePixelFormat
(
hdc
,
0
,
0
,
NULL
);
for
(
iPixelFormat
=
1
;
iPixelFormat
<=
nFormats
;
iPixelFormat
++
)
{
res
=
pwglGetPixelFormatAttribivARB
(
hdc
,
iPixelFormat
,
0
,
sizeof
(
iAttribList
)
/
sizeof
(
iAttribList
[
0
]),
iAttribList
,
iAttribRet
);
res
=
pwglGetPixelFormatAttribivARB
(
hdc
,
iPixelFormat
,
0
,
ARRAY_SIZE
(
iAttribList
),
iAttribList
,
iAttribRet
);
ok
(
res
!=
FALSE
,
"wglGetPixelFormatAttribivARB failed for pixel format %d
\n
"
,
iPixelFormat
);
if
(
res
==
FALSE
)
continue
;
...
...
@@ -588,7 +587,7 @@ static void test_gdi_dbuf(HDC hdc)
static
void
test_acceleration
(
HDC
hdc
)
{
const
int
iAttribList
[]
=
{
WGL_ACCELERATION_ARB
};
int
iAttribRet
[
sizeof
(
iAttribList
)
/
sizeof
(
iAttribList
[
0
]
)];
int
iAttribRet
[
ARRAY_SIZE
(
iAttribList
)];
unsigned
int
nFormats
;
int
iPixelFormat
;
int
res
;
...
...
@@ -603,9 +602,8 @@ static void test_acceleration(HDC hdc)
nFormats
=
DescribePixelFormat
(
hdc
,
0
,
0
,
NULL
);
for
(
iPixelFormat
=
1
;
iPixelFormat
<=
nFormats
;
iPixelFormat
++
)
{
res
=
pwglGetPixelFormatAttribivARB
(
hdc
,
iPixelFormat
,
0
,
sizeof
(
iAttribList
)
/
sizeof
(
iAttribList
[
0
]),
iAttribList
,
iAttribRet
);
res
=
pwglGetPixelFormatAttribivARB
(
hdc
,
iPixelFormat
,
0
,
ARRAY_SIZE
(
iAttribList
),
iAttribList
,
iAttribRet
);
ok
(
res
!=
FALSE
,
"wglGetPixelFormatAttribivARB failed for pixel format %d
\n
"
,
iPixelFormat
);
if
(
res
==
FALSE
)
continue
;
...
...
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