mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
dxgi: Introduce ARRAY_SIZE() macro.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
79a189b9ad
commit
c377644ca7
2 changed files with 4 additions and 2 deletions
|
@ -40,6 +40,8 @@
|
|||
#include "wine/wined3d.h"
|
||||
#include "wine/winedxgi.h"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
|
||||
enum dxgi_frame_latency
|
||||
{
|
||||
DXGI_FRAME_LATENCY_DEFAULT = 3,
|
||||
|
|
|
@ -655,7 +655,7 @@ D3D_FEATURE_LEVEL dxgi_check_feature_level_support(struct dxgi_factory *factory,
|
|||
shader_model = min(caps.VertexShaderVersion, caps.PixelShaderVersion);
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
for (j = 0; j < sizeof(feature_levels_sm) / sizeof(feature_levels_sm[0]); ++j)
|
||||
for (j = 0; j < ARRAY_SIZE(feature_levels_sm); ++j)
|
||||
{
|
||||
if (feature_levels[i] == feature_levels_sm[j].feature_level)
|
||||
{
|
||||
|
@ -671,7 +671,7 @@ D3D_FEATURE_LEVEL dxgi_check_feature_level_support(struct dxgi_factory *factory,
|
|||
if (selected_feature_level)
|
||||
break;
|
||||
|
||||
if (j == sizeof(feature_levels_sm) / sizeof(feature_levels_sm[0]))
|
||||
if (j == ARRAY_SIZE(feature_levels_sm))
|
||||
FIXME("Unexpected feature level %#x.\n", feature_levels[i]);
|
||||
else
|
||||
TRACE("Feature level %s not supported, trying next fallback if available.\n",
|
||||
|
|
Loading…
Reference in a new issue