mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 11:40:14 +02:00
Fixed localized error strings
This commit is contained in:
parent
66ffe6e882
commit
1ab21d9900
@ -27,9 +27,10 @@
|
|||||||
#include <cwchar>
|
#include <cwchar>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <list>
|
||||||
|
#include <locale>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <list>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -857,6 +858,9 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
|
|
||||||
wchar_t szOutputFile[MAX_PATH] = {};
|
wchar_t szOutputFile[MAX_PATH] = {};
|
||||||
|
|
||||||
|
// Set locale for output since GetErrorDesc can get localized strings.
|
||||||
|
std::locale::global(std::locale(""));
|
||||||
|
|
||||||
// Initialize COM (needed for WIC)
|
// Initialize COM (needed for WIC)
|
||||||
HRESULT hr = hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
HRESULT hr = hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <locale>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -1289,6 +1290,9 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
wchar_t szSuffix[MAX_PATH] = {};
|
wchar_t szSuffix[MAX_PATH] = {};
|
||||||
wchar_t szOutputDir[MAX_PATH] = {};
|
wchar_t szOutputDir[MAX_PATH] = {};
|
||||||
|
|
||||||
|
// Set locale for output since GetErrorDesc can get localized strings.
|
||||||
|
std::locale::global(std::locale(""));
|
||||||
|
|
||||||
// Initialize COM (needed for WIC)
|
// Initialize COM (needed for WIC)
|
||||||
HRESULT hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
HRESULT hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <locale>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -3104,6 +3105,9 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
uint32_t fileType = WIC_CODEC_BMP;
|
uint32_t fileType = WIC_CODEC_BMP;
|
||||||
wchar_t szOutputFile[MAX_PATH] = {};
|
wchar_t szOutputFile[MAX_PATH] = {};
|
||||||
|
|
||||||
|
// Set locale for output since GetErrorDesc can get localized strings.
|
||||||
|
std::locale::global(std::locale(""));
|
||||||
|
|
||||||
// Initialize COM (needed for WIC)
|
// Initialize COM (needed for WIC)
|
||||||
HRESULT hr = hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
HRESULT hr = hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user