Skip to content

Commit

Permalink
Allows user to hold B button on boot to automatically load first NOR …
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
WilliamsPaulM committed Oct 31, 2023
1 parent 62f16e2 commit da77032
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion source/ezkernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -2568,4 +2581,4 @@ int main(void) {
}
}
}
//---------------------------------------------------------------
//---------------------------------------------------------------

0 comments on commit da77032

Please sign in to comment.