From da77032cdd48b580743cdaeae429c654dfdfe809 Mon Sep 17 00:00:00 2001 From: Paul Williams Date: Tue, 31 Oct 2023 17:54:49 -0400 Subject: [PATCH] Allows user to hold B button on boot to automatically load first NOR file --- source/ezkernel.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/source/ezkernel.c b/source/ezkernel.c index 2537e6e..b19a25b 100644 --- a/source/ezkernel.c +++ b/source/ezkernel.c @@ -1642,6 +1642,17 @@ int main(void) { memset(pNorFS,00,sizeof(FM_NOR_FS)*MAX_NOR); Save_NOR_info(pNorFS,sizeof(FM_NOR_FS)*MAX_NOR); } + //credit to https://github.com/chrisdonahue + //https://github.com/ez-flash/omega-kernel/pull/4/files + else { + VBlankIntrWait(); + scanKeys(); + if(keysDownRepeat() & KEY_B || keysDown() & KEY_B) + { + page_num = NOR_list; + goto load_file; + } + } refind_file: @@ -2209,6 +2220,8 @@ int main(void) { ShowTime(page_num,page_mode); } //3 +load_file: + Clear(0, 0, 240, 160, gl_color_cheat_black, 1); DrawHZText12(gl_Loading,0,(240-strlen(gl_Loading)*6)/2,74, gl_color_text,1); @@ -2568,4 +2581,4 @@ int main(void) { } } } -//--------------------------------------------------------------- \ No newline at end of file +//---------------------------------------------------------------