DDSTextureLoader - cleaned up debug sdk layer name setting

This commit is contained in:
walbourn_cp 2012-05-23 15:44:09 -07:00
Родитель e85504e967
Коммит 505949d763
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -866,7 +866,7 @@ static HRESULT CreateD3DResources( _In_ ID3D11Device* d3dDevice,
}
else
{
#if defined(DEBUG) || defined(PROFILE)
#if defined(_DEBUG) || defined(PROFILE)
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
sizeof("DDSTextureLoader")-1,
"DDSTextureLoader" );
@ -950,7 +950,7 @@ static HRESULT CreateD3DResources( _In_ ID3D11Device* d3dDevice,
}
else
{
#if defined(DEBUG) || defined(PROFILE)
#if defined(_DEBUG) || defined(PROFILE)
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
sizeof("DDSTextureLoader")-1,
"DDSTextureLoader"
@ -1007,7 +1007,7 @@ static HRESULT CreateD3DResources( _In_ ID3D11Device* d3dDevice,
}
else
{
#if defined(DEBUG) || defined(PROFILE)
#if defined(_DEBUG) || defined(PROFILE)
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
sizeof("DDSTextureLoader")-1,
"DDSTextureLoader" );
@ -1310,7 +1310,7 @@ HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
maxsize
);
#if defined(DEBUG) || defined(PROFILE)
#if defined(_DEBUG) || defined(PROFILE)
if (texture != 0 && *texture != 0)
{
(*texture)->SetPrivateData( WKPDID_D3DDebugObjectName,
@ -1368,7 +1368,7 @@ HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
maxsize
);
#if defined(DEBUG) || defined(PROFILE)
#if defined(_DEBUG) || defined(PROFILE)
if (texture != 0 || textureView != 0)
{
CHAR strFileA[MAX_PATH];
@ -1394,7 +1394,7 @@ HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
if (texture != 0 && *texture != 0)
{
(*texture)->SetPrivateData( WKPDID_D3DDebugObjectName,
lstrlenA(pstrName),
static_cast<UINT>( strnlen_s(pstrName, MAX_PATH) ),
pstrName
);
}
@ -1402,7 +1402,7 @@ HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
if (textureView != 0 && *textureView != 0 )
{
(*textureView)->SetPrivateData( WKPDID_D3DDebugObjectName,
lstrlenA(pstrName),
static_cast<UINT>( strnlen_s(pstrName, MAX_PATH) ),
pstrName
);
}