From 15aeb67ec91887345300073ebbf65dbc9f927875 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Mon, 30 Dec 2019 06:54:11 +0800 Subject: [PATCH] osd: fix h/d options. --- menu.cpp | 7 +++++-- support/arcade/romutils.cpp | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/menu.cpp b/menu.cpp index 8031548..21753ec 100644 --- a/menu.cpp +++ b/menu.cpp @@ -1519,10 +1519,13 @@ void HandleUI(void) d = 0; //Hide or Disable flag - while ((p[0] == 'H' || p[0] == 'D') && strlen(p) > 2) + while ((p[0] == 'H' || p[0] == 'D' || p[0] == 'h' || p[0] == 'd') && strlen(p) > 2) { int flg = (hdmask & (1 << getIdx(p))) ? 1 : 0; - if (p[0] == 'H') h |= flg; else d |= flg; + if (p[0] == 'H') h |= flg; + if (p[0] == 'h') h |= (flg ^ 1); + if (p[0] == 'D') d |= flg; + if (p[0] == 'd') d |= (flg ^ 1); p += 2; } diff --git a/support/arcade/romutils.cpp b/support/arcade/romutils.cpp index b9e0fb3..10ffd47 100644 --- a/support/arcade/romutils.cpp +++ b/support/arcade/romutils.cpp @@ -163,6 +163,7 @@ static void file_finish(int send) user_io_set_download(1); uint8_t *data = romdata; + int len = romlen; while (romlen > 0) { uint16_t chunk = (romlen > 4096) ? 4096 : romlen; @@ -174,7 +175,7 @@ static void file_finish(int send) // signal end of transmission user_io_set_download(0); - printf("file_finish: sent to FPGA\n"); + printf("file_finish: %d bytes sent to FPGA\n", len); } else {