mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-06-08 08:33:53 +00:00
Adding support for utf-8 text and file I/O under Windows. Requires newer Windows builds:
https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page
This commit is contained in:
@@ -228,6 +228,9 @@
|
||||
<None Include="transcoder\basisu_transcoder_tables_dxt1_5.inc" />
|
||||
<None Include="transcoder\basisu_transcoder_tables_dxt1_6.inc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="basisu.manifest" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -198,4 +198,7 @@
|
||||
<UniqueIdentifier>{ab12ac82-9c39-494d-a36b-129dd1b2dec5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="basisu.manifest" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -32,6 +32,10 @@
|
||||
#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES
|
||||
#include "encoder/basisu_miniz.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
// Set BASISU_CATCH_EXCEPTIONS if you want exceptions to crash the app, otherwise main() catches them.
|
||||
#ifndef BASISU_CATCH_EXCEPTIONS
|
||||
#define BASISU_CATCH_EXCEPTIONS 0
|
||||
@@ -40,7 +44,7 @@
|
||||
using namespace basisu;
|
||||
using namespace buminiz;
|
||||
|
||||
#define BASISU_TOOL_VERSION "1.16.3"
|
||||
#define BASISU_TOOL_VERSION "1.16.4"
|
||||
|
||||
enum tool_mode
|
||||
{
|
||||
@@ -4499,6 +4503,9 @@ static int main_internal(int argc, const char **argv)
|
||||
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
#endif
|
||||
#ifdef _DEBUG
|
||||
printf("DEBUG\n");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user