From eea4a455f05fffbe5062bcc9f82a5899eb57a0d3 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 27 Oct 2017 15:48:28 +0100 Subject: [PATCH] sleep changes --- src/debug.c | 2 +- src/main.c | 25 ++++++++----------------- src/utils.c | 2 +- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/debug.c b/src/debug.c index 0b83ad9..97a6b59 100644 --- a/src/debug.c +++ b/src/debug.c @@ -20,5 +20,5 @@ void dbg_printf(display_context_t disp, const char *fmt, ...) sprintf(tmp, "%s", buf); printText(tmp, 3, -1, disp); display_show(disp); - sleep(5000); + sleep(3000); } \ No newline at end of file diff --git a/src/main.c b/src/main.c index 251ec3b..c1d11f2 100644 --- a/src/main.c +++ b/src/main.c @@ -2270,7 +2270,6 @@ void bootRom(display_context_t disp, int silent) if (ok == 0) { printText("cheats found...", 3, -1, disp); - //sleep(600); } else { @@ -2293,7 +2292,7 @@ void bootRom(display_context_t disp, int silent) } evd_lockRegs(); - //sleep(1000); + sleep(10); while (!(disp = display_lock())) ; @@ -2370,7 +2369,7 @@ void drawConfirmBox(display_context_t disp) printText(" ", 9, -1, disp); printText(" B Cancel", 9, -1, disp); - sleep(500); + sleep(300); } void drawShortInfoBox(display_context_t disp, char *text, u8 mode) @@ -3259,7 +3258,6 @@ void handleInput(display_context_t disp, sprite_t *contr) drawRomConfigBox(disp, 2); display_show(disp); input_mapping = rom_config_box; - sleep(80); break; case toplist: while (!(disp = display_lock())) @@ -3270,7 +3268,6 @@ void handleInput(display_context_t disp, sprite_t *contr) display_show(disp); input_mapping = toplist; - sleep(80); break; default: @@ -3332,7 +3329,6 @@ void handleInput(display_context_t disp, sprite_t *contr) display_show(disp); input_mapping = rom_config_box; - sleep(80); break; case toplist: while (!(disp = display_lock())) @@ -3343,7 +3339,6 @@ void handleInput(display_context_t disp, sprite_t *contr) display_show(disp); input_mapping = toplist; - sleep(80); break; default: @@ -3392,7 +3387,6 @@ void handleInput(display_context_t disp, sprite_t *contr) drawRomConfigBox(disp, 0); display_show(disp); input_mapping = rom_config_box; - sleep(80); break; default: @@ -3450,7 +3444,6 @@ void handleInput(display_context_t disp, sprite_t *contr) drawRomConfigBox(disp, 0); display_show(disp); input_mapping = rom_config_box; - sleep(80); break; default: @@ -3537,10 +3530,9 @@ void handleInput(display_context_t disp, sprite_t *contr) printText(" ", 9, -1, disp); printText("search...", 9, -1, disp); mpk_to_file(disp, input_text, 0); - sleep(300); drawShortInfoBox(disp, " done", 0); - sleep(2000); + sleep(1000); //reread filesystem cursor_line = 0; @@ -3588,7 +3580,7 @@ void handleInput(display_context_t disp, sprite_t *contr) printText(" B: Abort", 9, -1, disp); if (sound_on) playSound(2); - sleep(500); + sleep(1000); break; case mempak_menu: @@ -3743,7 +3735,7 @@ void handleInput(display_context_t disp, sprite_t *contr) break; } - sleep(500); + sleep(1000); input_mapping = abort_screen; break; @@ -3757,9 +3749,10 @@ void handleInput(display_context_t disp, sprite_t *contr) printText(" ", 9, -1, disp); file_to_mpk(disp, rom_filename); - sleep(300); drawShortInfoBox(disp, " done", 0); + sleep(1000); + input_mapping = abort_screen; display_show(disp); @@ -3775,10 +3768,9 @@ void handleInput(display_context_t disp, sprite_t *contr) printText("search...", 9, -1, disp); mpk_to_file(disp, list[cursor].filename, 1); //quick - sleep(300); drawShortInfoBox(disp, " done", 0); - sleep(500); + sleep(1000); input_mapping = abort_screen; break; @@ -3938,7 +3930,6 @@ void handleInput(display_context_t disp, sprite_t *contr) drawBoxNumber(disp, 3); //rominfo u16 msg = 0; - sleep(10); evd_ulockRegs(); sleep(10); sprintf(rom_filename, "%s", list[cursor].filename); diff --git a/src/utils.c b/src/utils.c index ecb9666..94235bf 100644 --- a/src/utils.c +++ b/src/utils.c @@ -242,7 +242,7 @@ int getSRAM( uint8_t *buffer, int size){ PI_Init(); - sleep(1000); //TODO: really... 1 second + sleep(15); //TODO: really... 1 second, changed to 15ms... better check it still works! while (dma_busy()) ;