X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=src%2Fcompat_win32.c;h=44822816afed5554bec473a6cb3f65ab5f97c5e0;hb=a79a11ef998649d87f8428b9d07f6e637905b292;hp=d65ea5032bd0b7ffd1c0a7a8b4a8abecc8b55d7f;hpb=7ce09815f76d9b3d454719458c119c189fc6711c;p=fdkaac.git diff --git a/src/compat_win32.c b/src/compat_win32.c index d65ea50..4482281 100644 --- a/src/compat_win32.c +++ b/src/compat_win32.c @@ -31,8 +31,13 @@ int __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, _startupinfo *); int64_t aacenc_timer(void) { +#if HAVE_STRUCT___TIMEB64 struct __timeb64 tv; _ftime64(&tv); +#else + struct timeb tv; + ftime(&tv); +#endif return (int64_t)tv.time * 1000 + tv.millitm; } @@ -152,7 +157,7 @@ int aacenc_fprintf(FILE *fp, const char *fmt, ...) codepage_decode_wchar(CP_UTF8, s, &ws); free(s); fflush(fp); - WriteConsoleW(fh, ws, cnt, &nw, 0); + WriteConsoleW(fh, ws, wcslen(ws), &nw, 0); free(ws); } return cnt;