mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-12-06 11:17:18 +00:00
Only allow deleteTitle when GodMode is enabled.
This commit is contained in:
1 parent
1bdcf008bf
commit
2142c1eb9c
3 files changed
+33
-12
No files matched your search
@@ -151,18 +151,22 @@ bool ScriptHelper::checkIfValid(std::string scriptFile, int mode) {
|
||||
}
|
||||
|
||||
void ScriptHelper::deleteTitle(const std::string TitleID, bool isNAND, std::string message) {
|
||||
std::string MSG = Lang::get("DELETE_TITLE") + "\n\n";
|
||||
if (isNAND) MSG += Lang::get("MEDIATYPE_NAND") + "\n" + TitleID;
|
||||
else MSG += Lang::get("MEDIATYPE_SD") + "\n" + TitleID;
|
||||
u64 ID = std::stoull(TitleID, 0, 16);
|
||||
if (Msg::promptMsg(MSG)) {
|
||||
if (isNAND == true) {
|
||||
Msg::DisplayMsg(message);
|
||||
deletePrevious(ID, MEDIATYPE_NAND);
|
||||
} else {
|
||||
Msg::DisplayMsg(message);
|
||||
deletePrevious(ID, MEDIATYPE_SD);
|
||||
if (Config::getBool("GODMODE")) {
|
||||
std::string MSG = Lang::get("DELETE_TITLE") + "\n\n";
|
||||
if (isNAND) MSG += Lang::get("MEDIATYPE_NAND") + "\n" + TitleID;
|
||||
else MSG += Lang::get("MEDIATYPE_SD") + "\n" + TitleID;
|
||||
u64 ID = std::stoull(TitleID, 0, 16);
|
||||
if (Msg::promptMsg(MSG)) {
|
||||
if (isNAND == true) {
|
||||
Msg::DisplayMsg(message);
|
||||
deletePrevious(ID, MEDIATYPE_NAND);
|
||||
} else {
|
||||
Msg::DisplayMsg(message);
|
||||
deletePrevious(ID, MEDIATYPE_SD);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Msg::DisplayWarnMsg(Lang::get("FUNCTION_NOT_ALLOWED"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user