mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-06 03:58:02 +08:00
Disable sleep mode during data operations.
This commit is contained in:
parent
585bc28963
commit
94f2a6a8aa
@ -644,6 +644,10 @@ void error_display_errno(volatile bool* dismissed, void* data, void (*drawTop)(u
|
||||
vsnprintf(textBuf, 1024, text, list);
|
||||
va_end(list);
|
||||
|
||||
if(err < 0) {
|
||||
err = -err;
|
||||
}
|
||||
|
||||
snprintf(errorData->fullText, 4096, "%s\nI/O Error: %s (%d)", textBuf, strerror(err), err);
|
||||
|
||||
prompt_display("Error", errorData->fullText, COLOR_TEXT, false, errorData, NULL, error_draw_top, error_onresponse);
|
||||
|
@ -305,7 +305,18 @@ static void networkinstall_wait_update(ui_view* view, void* data, float* progres
|
||||
networkInstallData->clientSocket = sock;
|
||||
prompt_display("Confirmation", "Install the received file(s)?", COLOR_TEXT, true, data, NULL, NULL, networkinstall_confirm_onresponse);
|
||||
} else if(errno != EAGAIN) {
|
||||
if(errno == 22 || errno == 115) {
|
||||
ui_pop();
|
||||
info_destroy(view);
|
||||
}
|
||||
|
||||
error_display_errno(NULL, NULL, NULL, errno, "Failed to open socket.");
|
||||
|
||||
if(errno == 22 || errno == 115) {
|
||||
networkinstall_free_data(networkInstallData);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
struct in_addr addr = {(in_addr_t) gethostid()};
|
||||
|
@ -130,6 +130,8 @@ static void task_data_op_thread(void* arg) {
|
||||
svcCloseHandle(data->cancelEvent);
|
||||
|
||||
data->finished = true;
|
||||
|
||||
aptSetSleepAllowed(true);
|
||||
}
|
||||
|
||||
Result task_data_op(data_op_data* data) {
|
||||
@ -162,5 +164,7 @@ Result task_data_op(data_op_data* data) {
|
||||
}
|
||||
}
|
||||
|
||||
aptSetSleepAllowed(false);
|
||||
|
||||
return res;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user