mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-06 03:58:02 +08:00
* Allow more than three choices in prompts. * Allow specifying a title version when installing CDN titles outside of the ticket list. * Fix titles displayed during TitleDB update. * Update title version and install status after TitleDB install/update.
40 lines
1.4 KiB
C
40 lines
1.4 KiB
C
#include <stdio.h>
|
|
|
|
#include <3ds.h>
|
|
|
|
#include "action.h"
|
|
#include "../task/task.h"
|
|
#include "../../error.h"
|
|
#include "../../info.h"
|
|
#include "../../list.h"
|
|
#include "../../prompt.h"
|
|
#include "../../ui.h"
|
|
#include "../../../core/linkedlist.h"
|
|
#include "../../../core/screen.h"
|
|
|
|
static void action_delete_secure_value_update(ui_view* view, void* data, float* progress, char* text) {
|
|
title_info* info = (title_info*) data;
|
|
|
|
u64 param = ((u64) SECUREVALUE_SLOT_SD << 32) | (info->titleId & 0xFFFFFFF);
|
|
u8 out = 0;
|
|
Result res = FSUSER_ControlSecureSave(SECURESAVE_ACTION_DELETE, ¶m, sizeof(param), &out, sizeof(out));
|
|
|
|
ui_pop();
|
|
info_destroy(view);
|
|
|
|
if(R_FAILED(res)) {
|
|
error_display_res(info, ui_draw_title_info, res, "Failed to delete secure value.");
|
|
} else {
|
|
prompt_display_notify("Success", "Secure value deleted.", COLOR_TEXT, info, ui_draw_title_info, NULL);
|
|
}
|
|
}
|
|
|
|
static void action_delete_secure_value_onresponse(ui_view* view, void* data, u32 response) {
|
|
if(response == PROMPT_YES) {
|
|
info_display("Deleting Secure Value", "", false, data, action_delete_secure_value_update, ui_draw_title_info);
|
|
}
|
|
}
|
|
|
|
void action_delete_secure_value(linked_list* items, list_item* selected) {
|
|
prompt_display_yes_no("Confirmation", "Delete the secure value of the selected title?", COLOR_TEXT, selected->data, ui_draw_title_info, action_delete_secure_value_onresponse);
|
|
} |