1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-08 22:10:05 +00:00

WICTextureLoader - cleaned up debug sdk layer name setting

This commit is contained in:
walbourn_cp 2012-05-23 15:50:51 -07:00
parent 505949d763
commit 8834749b02

View File

@ -526,7 +526,7 @@ static HRESULT CreateTextureFromWIC( _In_ ID3D11Device* d3dDevice,
}
else
{
#if defined(DEBUG) || defined(PROFILE)
#if defined(_DEBUG) || defined(PROFILE)
tex->SetPrivateData( WKPDID_D3DDebugObjectName,
sizeof("WICTextureLoader")-1,
"WICTextureLoader"
@ -593,7 +593,7 @@ HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
if ( FAILED(hr))
return hr;
#if defined(DEBUG) || defined(PROFILE)
#if defined(_DEBUG) || defined(PROFILE)
if (texture != 0 && *texture != 0)
{
(*texture)->SetPrivateData( WKPDID_D3DDebugObjectName,
@ -646,7 +646,7 @@ HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
if ( FAILED(hr))
return hr;
#if defined(DEBUG) || defined(PROFILE)
#if defined(_DEBUG) || defined(PROFILE)
if (texture != 0 || textureView != 0)
{
CHAR strFileA[MAX_PATH];
@ -672,7 +672,7 @@ HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
if (texture != 0 && *texture != 0)
{
(*texture)->SetPrivateData( WKPDID_D3DDebugObjectName,
lstrlenA(pstrName),
static_cast<UINT>( strnlen_s(pstrName, MAX_PATH) ),
pstrName
);
}
@ -680,7 +680,7 @@ HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
if (textureView != 0 && *textureView != 0 )
{
(*textureView)->SetPrivateData( WKPDID_D3DDebugObjectName,
lstrlenA(pstrName),
static_cast<UINT>( strnlen_s(pstrName, MAX_PATH) ),
pstrName
);
}