diff --git a/support/arcade/romutils.cpp b/support/arcade/romutils.cpp index e033b26..f94f297 100644 --- a/support/arcade/romutils.cpp +++ b/support/arcade/romutils.cpp @@ -32,7 +32,7 @@ struct arc_struct { struct MD5Context context; }; -char global_error_msg[kBigTextSize]; +static char arcade_error_msg[kBigTextSize] = {}; static char arcade_root[kBigTextSize]; #define DEBUG_ROM_BINARY 0 @@ -450,22 +450,21 @@ int arcade_send_rom(const char *xml) XMLDoc_parse_file_SAX(xml, &sax, &arc_info); if (arc_info.validrom0 == 0 && strlen(arc_info.error_msg)) { - strcpy(global_error_msg, arc_info.error_msg); - printf("arcade_send_rom: pretty error: [%s]\n", global_error_msg); + strcpy(arcade_error_msg, arc_info.error_msg); + printf("arcade_send_rom: pretty error: [%s]\n", arcade_error_msg); } buffer_destroy(arc_info.data); return 0; } -int arcade_check_error(void) +void arcade_check_error() { - if (global_error_msg[0] != 0) { - printf("ERROR: [%s]\n", global_error_msg); - Info(global_error_msg, 1000 * 30); - global_error_msg[0] = 0; + if (arcade_error_msg[0] != 0) { + printf("ERROR: [%s]\n", arcade_error_msg); + Info(arcade_error_msg, 1000 * 30); + arcade_error_msg[0] = 0; + sleep(3); } - - return 0; } static const char *get_rbf(const char *xml) diff --git a/support/arcade/romutils.h b/support/arcade/romutils.h index 98868a6..703e98a 100644 --- a/support/arcade/romutils.h +++ b/support/arcade/romutils.h @@ -3,6 +3,6 @@ int arcade_send_rom(const char *xml); int arcade_load(const char *xml); -int arcade_check_error(void); +void arcade_check_error(); #endif diff --git a/user_io.cpp b/user_io.cpp index 0ba7a3a..bfe41ab 100644 --- a/user_io.cpp +++ b/user_io.cpp @@ -917,6 +917,7 @@ void user_io_init(const char *path, const char *xml) // release reset user_io_8bit_set_status(0, UIO_STATUS_RESET); + if(xml) arcade_check_error(); break; } diff --git a/video.cpp b/video.cpp index a4d0b31..5b0699e 100644 --- a/video.cpp +++ b/video.cpp @@ -603,8 +603,6 @@ static uint32_t show_video_info(int force) Info(str, cfg.video_info * 1000); } - arcade_check_error(); - uint32_t scrh = v_cur.item[5]; if (height && scrh) {