Genesis-Plus-GX/psp2/error.c
Francisco José García García fa9ef21b86 Initial PSVITA port
2015-08-30 01:44:58 +02:00

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
}