mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-12-23 00:52:10 +00:00
Block HOME button presses during dumping operations in code templates.
This commit is contained in:
parent
3eb5239d38
commit
3105540c99
4 changed files with 12 additions and 0 deletions
|
@ -69,6 +69,8 @@ int main(int argc, char *argv[])
|
|||
if (status == GameCardStatus_InsertedAndInfoNotLoaded) consolePrint("gamecard inserted but info couldn't be loaded from it. check nogc patch setting.\n");
|
||||
}
|
||||
|
||||
utilsChangeHomeButtonBlockStatus(true);
|
||||
|
||||
consolePrint("gamecard detected.\n");
|
||||
|
||||
if (!gamecardGetKeyArea(&gc_key_area))
|
||||
|
@ -94,6 +96,8 @@ int main(int argc, char *argv[])
|
|||
|
||||
consolePrint("successfully saved key area to \"%s\"\n", path);
|
||||
|
||||
utilsChangeHomeButtonBlockStatus(false);
|
||||
|
||||
out2:
|
||||
consolePrint("press any button to exit\n");
|
||||
utilsWaitForButtonPress(KEY_NONE);
|
||||
|
|
|
@ -358,7 +358,9 @@ int main(int argc, char *argv[])
|
|||
if (menu == 3)
|
||||
{
|
||||
consoleClear();
|
||||
utilsChangeHomeButtonBlockStatus(true);
|
||||
dumpFsSection(cur_title_info, &(nca_ctx->fs_contexts[selected_idx]));
|
||||
utilsChangeHomeButtonBlockStatus(false);
|
||||
}
|
||||
|
||||
if (error || menu >= 3)
|
||||
|
|
|
@ -429,6 +429,8 @@ int main(int argc, char *argv[])
|
|||
time_t btn_cancel_start_tmr = 0, btn_cancel_end_tmr = 0;
|
||||
bool btn_cancel_cur_state = false, btn_cancel_prev_state = false;
|
||||
|
||||
utilsChangeHomeButtonBlockStatus(true);
|
||||
|
||||
consolePrint("hold b to cancel\n\n");
|
||||
|
||||
start = time(NULL);
|
||||
|
@ -483,6 +485,8 @@ int main(int argc, char *argv[])
|
|||
thrd_join(write_thread, NULL);
|
||||
consolePrint("write_thread done: %lu\n", time(NULL));
|
||||
|
||||
utilsChangeHomeButtonBlockStatus(false);
|
||||
|
||||
if (shared_data.read_error || shared_data.write_error)
|
||||
{
|
||||
consolePrint("usb transfer error\n");
|
||||
|
|
|
@ -358,7 +358,9 @@ int main(int argc, char *argv[])
|
|||
if (menu == 3)
|
||||
{
|
||||
consoleClear();
|
||||
utilsChangeHomeButtonBlockStatus(true);
|
||||
dumpFsSection(cur_title_info, &(nca_ctx->fs_contexts[selected_idx]));
|
||||
utilsChangeHomeButtonBlockStatus(false);
|
||||
}
|
||||
|
||||
if (error || menu >= 3)
|
||||
|
|
Loading…
Reference in a new issue