1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-09 22:40:06 +00:00

Updated libraries for VS 2015 C99 and legacy printf conformance

- Static libraries built with _CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS
This commit is contained in:
walbourn_cp 2015-01-24 01:17:54 -08:00
parent e06c43fc9b
commit 5f95b87ddf
4 changed files with 32 additions and 32 deletions

View File

@ -111,7 +111,7 @@ int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
if ( FAILED(hr) )
{
WCHAR buff[2048];
swprintf_s( buff, L"Failed to open texture file\n\nFilename = %s\nHRESULT %08X", lpCmdLine, hr );
swprintf_s( buff, L"Failed to open texture file\n\nFilename = %ls\nHRESULT %08X", lpCmdLine, hr );
MessageBox( NULL, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION );
return 0;
}
@ -132,7 +132,7 @@ int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
if ( mdata.arraySize > 1 )
{
WCHAR buff[2048];
swprintf_s( buff, L"Arrays of volume textures are not supported\n\nFilename = %s\nArray size %Iu", lpCmdLine, mdata.arraySize );
swprintf_s( buff, L"Arrays of volume textures are not supported\n\nFilename = %ls\nArray size %Iu", lpCmdLine, mdata.arraySize );
MessageBox( NULL, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION );
return 0;
}
@ -155,7 +155,7 @@ int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
if ( g_featureLevel < D3D_FEATURE_LEVEL_11_0 )
{
WCHAR buff[2048];
swprintf_s( buff, L"BC6H/BC7 requires DirectX 11 hardware\n\nFilename = %s\nDXGI Format %d\nFeature Level %d", lpCmdLine, mdata.format, g_featureLevel );
swprintf_s( buff, L"BC6H/BC7 requires DirectX 11 hardware\n\nFilename = %ls\nDXGI Format %d\nFeature Level %d", lpCmdLine, mdata.format, g_featureLevel );
MessageBox( NULL, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION );
return 0;
}
@ -168,7 +168,7 @@ int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
if ( FAILED(hr) || !(flags & (D3D11_FORMAT_SUPPORT_TEXTURE1D|D3D11_FORMAT_SUPPORT_TEXTURE2D|D3D11_FORMAT_SUPPORT_TEXTURE3D)) )
{
WCHAR buff[2048];
swprintf_s( buff, L"Format not supported by DirectX hardware\n\nFilename = %s\nDXGI Format %d\nFeature Level %d\nHRESULT = %08X", lpCmdLine, mdata.format, g_featureLevel, hr );
swprintf_s( buff, L"Format not supported by DirectX hardware\n\nFilename = %ls\nDXGI Format %d\nFeature Level %d\nHRESULT = %08X", lpCmdLine, mdata.format, g_featureLevel, hr );
MessageBox( NULL, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION );
return 0;
}
@ -181,7 +181,7 @@ int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
if ( FAILED(hr) )
{
WCHAR buff[2048];
swprintf_s( buff, L"Failed to load texture file\n\nFilename = %s\nHRESULT %08X", lpCmdLine, hr );
swprintf_s( buff, L"Failed to load texture file\n\nFilename = %ls\nHRESULT %08X", lpCmdLine, hr );
MessageBox( NULL, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION );
return 0;
}
@ -193,7 +193,7 @@ int WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
if ( FAILED(hr) )
{
WCHAR buff[2048];
swprintf_s( buff, L"Failed creating texture from file\n\nFilename = %s\nHRESULT = %08X", lpCmdLine, hr );
swprintf_s( buff, L"Failed creating texture from file\n\nFilename = %ls\nHRESULT = %08X", lpCmdLine, hr );
MessageBox( NULL, buff, L"DDSView", MB_OK | MB_ICONEXCLAMATION );
return 0;
}

View File

@ -141,7 +141,7 @@
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<ExceptionHandling>Sync</ExceptionHandling>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<PrecompiledHeader>Use</PrecompiledHeader>
@ -182,7 +182,7 @@
<FloatingPointModel>Fast</FloatingPointModel>
<ExceptionHandling>Sync</ExceptionHandling>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;_DEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
@ -224,7 +224,7 @@
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<ExceptionHandling>Sync</ExceptionHandling>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
@ -266,7 +266,7 @@
<FloatingPointModel>Fast</FloatingPointModel>
<ExceptionHandling>Sync</ExceptionHandling>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
@ -309,7 +309,7 @@
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<ExceptionHandling>Sync</ExceptionHandling>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;PROFILE;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;PROFILE;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
@ -351,7 +351,7 @@
<FloatingPointModel>Fast</FloatingPointModel>
<ExceptionHandling>Sync</ExceptionHandling>
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;PROFILE;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_UNICODE;UNICODE;WIN32;NDEBUG;PROFILE;_LIB;_WIN7_PLATFORM_UPDATE;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>

View File

@ -258,7 +258,7 @@ void PrintList(size_t cch, SValue *pValue)
cch = 6;
}
wprintf( L"%s ", pValue->pName );
wprintf( L"%ls ", pValue->pName );
cch += cchName + 2;
pValue++;
}
@ -378,7 +378,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
case OPT_WIDTH:
if (swscanf_s(pValue, L"%Iu", &width) != 1)
{
wprintf( L"Invalid value specified with -w (%s)\n", pValue);
wprintf( L"Invalid value specified with -w (%ls)\n", pValue);
return 1;
}
break;
@ -386,7 +386,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
case OPT_HEIGHT:
if (swscanf_s(pValue, L"%Iu", &height) != 1)
{
wprintf( L"Invalid value specified with -h (%s)\n", pValue);
wprintf( L"Invalid value specified with -h (%ls)\n", pValue);
return 1;
}
break;
@ -395,7 +395,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
format = (DXGI_FORMAT) LookupByName(pValue, g_pFormats);
if ( !format )
{
wprintf( L"Invalid value specified with -f (%s)\n", pValue);
wprintf( L"Invalid value specified with -f (%ls)\n", pValue);
return 1;
}
break;
@ -404,7 +404,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
dwFilter = LookupByName(pValue, g_pFilters);
if ( !dwFilter )
{
wprintf( L"Invalid value specified with -if (%s)\n", pValue);
wprintf( L"Invalid value specified with -if (%ls)\n", pValue);
return 1;
}
break;
@ -493,7 +493,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
_wmakepath_s( szOutputFile, nullptr, nullptr, fname, L".dds" );
}
wprintf( L"reading %s", pConv->szSrc );
wprintf( L"reading %ls", pConv->szSrc );
fflush(stdout);
TexMetadata info;
@ -710,7 +710,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
}
// Write texture
wprintf( L"\nWriting %s ", szOutputFile);
wprintf( L"\nWriting %ls ", szOutputFile);
PrintInfo( result.GetMetadata() );
wprintf( L"\n" );
fflush(stdout);

View File

@ -406,7 +406,7 @@ void PrintList(size_t cch, SValue *pValue)
cch = 6;
}
wprintf( L"%s ", pValue->pName );
wprintf( L"%ls ", pValue->pName );
cch += cchName + 2;
pValue++;
}
@ -550,7 +550,7 @@ bool CreateDevice( _Outptr_ ID3D11Device** pDevice )
hr = pAdapter->GetDesc( &desc );
if ( SUCCEEDED(hr) )
{
wprintf( L"\n[Using DirectCompute on \"%s\"]\n", desc.Description );
wprintf( L"\n[Using DirectCompute on \"%ls\"]\n", desc.Description );
}
}
}
@ -691,7 +691,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
case OPT_WIDTH:
if (swscanf_s(pValue, L"%Iu", &width) != 1)
{
wprintf( L"Invalid value specified with -w (%s)\n", pValue);
wprintf( L"Invalid value specified with -w (%ls)\n", pValue);
wprintf( L"\n");
PrintUsage();
return 1;
@ -701,7 +701,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
case OPT_HEIGHT:
if (swscanf_s(pValue, L"%Iu", &height) != 1)
{
wprintf( L"Invalid value specified with -h (%s)\n", pValue);
wprintf( L"Invalid value specified with -h (%ls)\n", pValue);
printf("\n");
PrintUsage();
return 1;
@ -711,7 +711,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
case OPT_MIPLEVELS:
if (swscanf_s(pValue, L"%Iu", &mipLevels) != 1)
{
wprintf( L"Invalid value specified with -m (%s)\n", pValue);
wprintf( L"Invalid value specified with -m (%ls)\n", pValue);
wprintf( L"\n");
PrintUsage();
return 1;
@ -722,7 +722,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
format = (DXGI_FORMAT) LookupByName(pValue, g_pFormats);
if ( !format )
{
wprintf( L"Invalid value specified with -f (%s)\n", pValue);
wprintf( L"Invalid value specified with -f (%ls)\n", pValue);
wprintf( L"\n");
PrintUsage();
return 1;
@ -733,7 +733,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
dwFilter = LookupByName(pValue, g_pFilters);
if ( !dwFilter )
{
wprintf( L"Invalid value specified with -if (%s)\n", pValue);
wprintf( L"Invalid value specified with -if (%ls)\n", pValue);
wprintf( L"\n");
PrintUsage();
return 1;
@ -772,7 +772,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
FileType = LookupByName(pValue, g_pSaveFileTypes);
if ( !FileType )
{
wprintf( L"Invalid value specified with -ft (%s)\n", pValue);
wprintf( L"Invalid value specified with -ft (%ls)\n", pValue);
wprintf( L"\n");
PrintUsage();
return 1;
@ -803,7 +803,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
maxSize = LookupByName( pValue, g_pFeatureLevels );
if ( !maxSize )
{
wprintf( L"Invalid value specified with -fl (%s)\n", pValue);
wprintf( L"Invalid value specified with -fl (%ls)\n", pValue);
wprintf( L"\n");
PrintUsage();
return 1;
@ -813,14 +813,14 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
case OPT_ALPHA_WEIGHT:
if (swscanf_s(pValue, L"%f", &alphaWeight) != 1)
{
wprintf( L"Invalid value specified with -aw (%s)\n", pValue);
wprintf( L"Invalid value specified with -aw (%ls)\n", pValue);
wprintf( L"\n");
PrintUsage();
return 1;
}
else if ( alphaWeight < 0.f )
{
wprintf( L"-aw (%s) parameter must be positive\n", pValue);
wprintf( L"-aw (%ls) parameter must be positive\n", pValue);
wprintf( L"\n");
return 1;
}
@ -884,7 +884,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
wprintf( L"\n");
// Load source image
wprintf( L"reading %s", pConv->szSrc );
wprintf( L"reading %ls", pConv->szSrc );
fflush(stdout);
WCHAR ext[_MAX_EXT];
@ -1573,7 +1573,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
wcscat_s(pConv->szDest, MAX_PATH, szSuffix);
// Write texture
wprintf( L"writing %s", pConv->szDest);
wprintf( L"writing %ls", pConv->szDest);
fflush(stdout);
switch( FileType )