mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-04-06 03:58:02 +08:00
36 lines
1.2 KiB
C
36 lines
1.2 KiB
C
#include <stdio.h>
|
|
|
|
#include <3ds.h>
|
|
|
|
#include "action.h"
|
|
#include "../resources.h"
|
|
#include "../task/uitask.h"
|
|
#include "../../core/core.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, task_draw_title_info, res, "无法删除安全值.");
|
|
} else {
|
|
prompt_display_notify("成功", "已删除.", COLOR_TEXT, info, task_draw_title_info, NULL);
|
|
}
|
|
}
|
|
|
|
static void action_delete_secure_value_onresponse(ui_view* view, void* data, u32 response) {
|
|
if(response == PROMPT_YES) {
|
|
info_display("正在删除", "", false, data, action_delete_secure_value_update, task_draw_title_info);
|
|
}
|
|
}
|
|
|
|
void action_delete_secure_value(linked_list* items, list_item* selected) {
|
|
prompt_display_yes_no("确认", "删除所选应用的安全值?", COLOR_TEXT, selected->data, task_draw_title_info, action_delete_secure_value_onresponse);
|
|
}
|