Search
lxdream.org :: lxdream/src/util.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/util.c
changeset 447:3e095bfcb476
prev437:2c259474b474
next477:9a373f2ff009
author nkeynes
date Tue Oct 16 12:36:29 2007 +0000 (14 years ago)
permissions -rw-r--r--
last change Add gui error reporting
Add initial controller settings dialog
file annotate diff log raw
1.1 --- a/src/util.c Thu Oct 11 08:22:03 2007 +0000
1.2 +++ b/src/util.c Tue Oct 16 12:36:29 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: util.c,v 1.9 2007-10-11 08:22:03 nkeynes Exp $
1.6 + * $Id: util.c,v 1.10 2007-10-16 12:36:29 nkeynes Exp $
1.7 *
1.8 * Miscellaneous utility functions.
1.9 *
1.10 @@ -102,12 +102,23 @@
1.11 if( level > global_msg_level ) {
1.12 return; // ignored
1.13 }
1.14 +
1.15 va_start(ap, msg);
1.16
1.17 + if( level <= EMIT_ERR ) {
1.18 + gchar *text = g_strdup_vprintf( msg, ap );
1.19 + if( gui_error_dialog( text ) ) {
1.20 + g_free(text);
1.21 + va_end(ap);
1.22 + return;
1.23 + }
1.24 + g_free(text);
1.25 + }
1.26 +
1.27 +
1.28 strftime( buf, sizeof(buf), "%H:%M:%S", localtime(&tm) );
1.29 -
1.30 fprintf( stderr, "%s %08X %-5s ", buf, sh4r.pc, msg_levels[level] );
1.31 vfprintf( stderr, msg, ap );
1.32 + va_end(ap);
1.33 fprintf( stderr, "\n" );
1.34 - va_end(ap);
1.35 }
.