mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-22 04:40:41 +02:00
win32: Improve error logging
On win32 stderr is fully buffered, so fflush() should be called after each error to ensure it is printed to the console. There is no need to use fwprintf if the format string can be represented as char*. See https://bugs.freedesktop.org/show_bug.cgi?id=33319
This commit is contained in:
parent
72a9d49a53
commit
47d14586f5
1 changed files with 3 additions and 1 deletions
|
|
@ -124,11 +124,13 @@ _cairo_win32_print_gdi_error (const char *context)
|
|||
0, NULL)) {
|
||||
fprintf (stderr, "%s: Unknown GDI error", context);
|
||||
} else {
|
||||
fwprintf (stderr, L"%s: %S", context, (wchar_t *)lpMsgBuf);
|
||||
fprintf (stderr, "%s: %S", context, (wchar_t *)lpMsgBuf);
|
||||
|
||||
LocalFree (lpMsgBuf);
|
||||
}
|
||||
|
||||
fflush (stderr);
|
||||
|
||||
/* We should switch off of last_status, but we'd either return
|
||||
* CAIRO_STATUS_NO_MEMORY or CAIRO_STATUS_UNKNOWN_ERROR and there
|
||||
* is no CAIRO_STATUS_UNKNOWN_ERROR.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue