mirror of
https://github.com/libretro/Genesis-Plus-GX.git
synced 2024-11-23 08:19:39 +00:00
36 lines
487 B
C
36 lines
487 B
C
/*
|
|
error.c --
|
|
Error logging
|
|
*/
|
|
|
|
#include "osd.h"
|
|
|
|
static FILE *error_log;
|
|
|
|
void error_init(void)
|
|
{
|
|
#ifdef LOGERROR
|
|
error_log = fopen("error.log","w");
|
|
#endif
|
|
}
|
|
|
|
void error_shutdown(void)
|
|
{
|
|
#ifdef LOGERROR
|
|
if(error_log) fclose(error_log);
|
|
#endif
|
|
}
|
|
|
|
void error(char *format, ...)
|
|
{
|
|
#ifdef LOGERROR
|
|
if (log_error)
|
|
{
|
|
va_list ap;
|
|
va_start(ap, format);
|
|
if(error_log) vfprintf(error_log, format, ap);
|
|
va_end(ap);
|
|
}
|
|
#endif
|
|
}
|