diff --git a/menu.cpp b/menu.cpp index 22cf96e..07aadcb 100644 --- a/menu.cpp +++ b/menu.cpp @@ -72,7 +72,6 @@ enum MENU MENU_MISC1, MENU_MISC2, - MENU_ERROR, MENU_INFO, MENU_FILE_SELECT1, @@ -848,7 +847,7 @@ static void vga_nag() OsdWrite(n++, " vga_scaler=1"); for (; n < OsdGetSize(); n++) OsdWrite(n); OsdUpdate(); - OsdEnable(0); + OsdEnable(OSD_MSG); EnableOsd_on(OSD_HDMI); } @@ -1286,7 +1285,6 @@ void HandleUI(void) case MENU_NONE1: case MENU_NONE2: case MENU_INFO: - case MENU_ERROR: break; default: @@ -1312,7 +1310,6 @@ void HandleUI(void) case MENU_INFO: if (CheckTimer(menu_timer)) menustate = MENU_NONE1; // fall through - case MENU_ERROR: case MENU_NONE2: if (menu || (is_menu() && !video_fb_state())) { @@ -6513,22 +6510,12 @@ static void set_text(const char *message, unsigned char code) while (l <= 7) OsdWrite(l++, "", 0, 0); } -/* Error Message */ -void ErrorMessage(const char *message, unsigned char code) -{ - menustate = MENU_ERROR; - - OsdSetTitle("Error", 0); - set_text(message, code); - OsdEnable(0); // do not disable KEYBOARD -} - void InfoMessage(const char *message, int timeout, const char *title) { if (menustate != MENU_INFO) { OsdSetTitle(title, 0); - OsdEnable(0); // do not disable keyboard + OsdEnable(OSD_MSG); // do not disable keyboard } set_text(message, 0); diff --git a/menu.h b/menu.h index 86568a3..1b23baf 100644 --- a/menu.h +++ b/menu.h @@ -10,7 +10,6 @@ void PrintDirectory(int expand = 0); void ScrollLongName(void); void ProgressMessage(const char* title = 0, const char* text = 0, int current = 0, int max = 0); -void ErrorMessage(const char *message, unsigned char code); void InfoMessage(const char *message, int timeout = 2000, const char *title = "Message"); void Info(const char *message, int timeout = 2000, int width = 0, int height = 0, int frame = 0); void MenuHide(); diff --git a/osd.cpp b/osd.cpp index ac48858..7c66261 100644 --- a/osd.cpp +++ b/osd.cpp @@ -500,7 +500,7 @@ void OsdClear(void) void OsdEnable(unsigned char mode) { user_io_osd_key_enable(mode & DISABLE_KEYBOARD); - mode &= DISABLE_KEYBOARD; + mode &= (DISABLE_KEYBOARD | OSD_MSG); spi_osd_cmd(OSD_CMD_ENABLE | mode); } diff --git a/osd.h b/osd.h index a0de5e7..6ceb377 100644 --- a/osd.h +++ b/osd.h @@ -6,6 +6,7 @@ // some constants #define DISABLE_KEYBOARD 0x02 // disable keyboard while OSD is active #define OSD_INFO 0x04 // display info +#define OSD_MSG 0x08 // display message window #define REPEATDELAY 500 // repeat delay in 1ms units #define REPEATRATE 50 // repeat rate in 1ms units diff --git a/support/minimig/minimig_fdd.cpp b/support/minimig/minimig_fdd.cpp index 14a01c8..0413a19 100644 --- a/support/minimig/minimig_fdd.cpp +++ b/support/minimig/minimig_fdd.cpp @@ -595,7 +595,7 @@ void WriteTrack(adfTYPE *drive) if (Error) { fdd_debugf("WriteTrack: error %u\n", Error); - ErrorMessage(" WriteTrack", Error); + Info("Write error"); } } }