diff --git a/examples/vwebp.c b/examples/vwebp.c index ef26e1ba..35f1b188 100644 --- a/examples/vwebp.c +++ b/examples/vwebp.c @@ -292,6 +292,19 @@ static void PrintString(const char* const text) { } } +static void PrintStringW(const char* const text) { +#if defined(_WIN32) && defined(_UNICODE) + void* const font = GLUT_BITMAP_9_BY_15; + const W_CHAR* const wtext = (const W_CHAR*)text; + int i; + for (i = 0; wtext[i]; ++i) { + glutBitmapCharacter(font, wtext[i]); + } +#else + PrintString(text); +#endif +} + static float GetColorf(uint32_t color, int shift) { return ((color >> shift) & 0xff) / 255.f; } @@ -396,7 +409,7 @@ static void HandleDisplay(void) { glColor4f(0.90f, 0.0f, 0.90f, 1.0f); glRasterPos2f(-0.95f, 0.90f); - PrintString(kParams.file_name); + PrintStringW(kParams.file_name); snprintf(tmp, sizeof(tmp), "Dimension:%d x %d", pic->width, pic->height); glColor4f(0.90f, 0.0f, 0.90f, 1.0f); diff --git a/examples/webpmux.c b/examples/webpmux.c index c58c4232..b61eed6e 100644 --- a/examples/webpmux.c +++ b/examples/webpmux.c @@ -685,7 +685,7 @@ static int ParseCommandLine(Config* config, const W_CHAR** const unicode_argv) { ERROR_GOTO1("ERROR: Multiple features specified.\n", ErrParse); } arg->subtype_ = SUBTYPE_ANMF; - arg->filename_ = argv[i + 1]; + arg->filename_ = wargv[i + 1]; arg->params_ = argv[i + 2]; ++feature_arg_index; i += 3;