mirror of
https://github.com/hax4dazy/TinWoo.git
synced 2025-02-09 19:25:05 +01:00
add missing sound and icon for nca verify
This commit is contained in:
parent
7509bd8092
commit
f127ddd7dc
@ -117,14 +117,9 @@ namespace nspInstStuff_B {
|
||||
inst::ui::instPage::setInstBarPerc(0);
|
||||
|
||||
if (inst::config::useSound) {
|
||||
std::string audioPath = "";
|
||||
std::string audioPath = "romfs:/audio/fail.mp3";
|
||||
std::string fail = inst::config::appDir + "audio.fail"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(fail)) {
|
||||
audioPath = (fail);
|
||||
}
|
||||
else {
|
||||
audioPath = "romfs:/audio/ohno.wav";
|
||||
}
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(fail)) audioPath = (fail);
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
audioThread.join();
|
||||
}
|
||||
@ -144,14 +139,9 @@ namespace nspInstStuff_B {
|
||||
inst::ui::instPage::setInstBarPerc(100);
|
||||
|
||||
if (inst::config::useSound) {
|
||||
std::string audioPath = "";
|
||||
std::string audioPath = "romfs:/audio/pass.mp3";
|
||||
std::string pass = inst::config::appDir + "audio.pass"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(pass)) {
|
||||
audioPath = (pass);
|
||||
}
|
||||
else {
|
||||
audioPath = "romfs:/audio/yipee.wav";
|
||||
}
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(pass)) audioPath = (pass);
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
audioThread.join();
|
||||
}
|
||||
|
@ -121,8 +121,15 @@ namespace tin::install::nsp
|
||||
|
||||
if (!Crypto::rsa2048PssVerify(&header->magic, 0x200, header->fixed_key_sig, Crypto::NCAHeaderSignature))
|
||||
{
|
||||
std::thread audioThread(inst::util::playAudio, "romfs:/audio/bark.wav");
|
||||
int rc = inst::ui::mainApp->CreateShowDialog("inst.nca_verify.title"_lang, "inst.nca_verify.desc"_lang, { "common.cancel"_lang, "inst.nca_verify.opt1"_lang }, false);
|
||||
std::string audioPath = "romfs:/audio/infobeep.mp3";
|
||||
std::string beep = inst::config::appDir + "audio.infobeep"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(beep)) audioPath = (beep);
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
std::string information = "romfs:/images/icons/information.png";
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(inst::config::appDir + "icons_others.information"_theme)) {
|
||||
information = inst::config::appDir + "icons_others.good"_theme;
|
||||
}
|
||||
int rc = inst::ui::mainApp->CreateShowDialog("inst.nca_verify.title"_lang, "inst.nca_verify.desc"_lang, { "common.cancel"_lang, "inst.nca_verify.opt1"_lang }, false, information);
|
||||
audioThread.join();
|
||||
if (rc != 1)
|
||||
THROW_FORMAT(("inst.nca_verify.error"_lang + tin::util::GetNcaIdString(ncaId)).c_str());
|
||||
|
@ -33,6 +33,7 @@ SOFTWARE.
|
||||
#include "util/lang.hpp"
|
||||
#include "install/nca.hpp"
|
||||
#include "ui/MainApplication.hpp"
|
||||
#include "util/theme.hpp"
|
||||
|
||||
namespace inst::ui {
|
||||
extern MainApplication* mainApp;
|
||||
@ -113,8 +114,15 @@ namespace tin::install::xci
|
||||
|
||||
if (!Crypto::rsa2048PssVerify(&header->magic, 0x200, header->fixed_key_sig, Crypto::NCAHeaderSignature))
|
||||
{
|
||||
std::thread audioThread(inst::util::playAudio, "romfs:/audio/bark.wav");
|
||||
int rc = inst::ui::mainApp->CreateShowDialog("inst.nca_verify.title"_lang, "inst.nca_verify.desc"_lang, { "common.cancel"_lang, "inst.nca_verify.opt1"_lang }, false);
|
||||
std::string audioPath = "romfs:/audio/infobeep.mp3";
|
||||
std::string beep = inst::config::appDir + "audio.infobeep"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(beep)) audioPath = (beep);
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
std::string information = "romfs:/images/icons/information.png";
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(inst::config::appDir + "icons_others.information"_theme)) {
|
||||
information = inst::config::appDir + "icons_others.good"_theme;
|
||||
}
|
||||
int rc = inst::ui::mainApp->CreateShowDialog("inst.nca_verify.title"_lang, "inst.nca_verify.desc"_lang, { "common.cancel"_lang, "inst.nca_verify.opt1"_lang }, false, information);
|
||||
audioThread.join();
|
||||
if (rc != 1)
|
||||
THROW_FORMAT(("inst.nca_verify.error"_lang + tin::util::GetNcaIdString(ncaId)).c_str());
|
||||
|
@ -250,10 +250,9 @@ namespace netInstStuff {
|
||||
inst::ui::instPage::setInstBarPerc(0);
|
||||
|
||||
if (inst::config::useSound) {
|
||||
std::string audioPath = "";
|
||||
std::string audioPath = "romfs:/audio/fail.mp3";
|
||||
std::string fail = inst::config::appDir + "audio.fail"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(fail)) audioPath = (fail);
|
||||
else audioPath = "romfs:/audio/ohno.wav";
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
audioThread.join();
|
||||
}
|
||||
@ -283,14 +282,9 @@ namespace netInstStuff {
|
||||
inst::ui::instPage::setInstBarPerc(100);
|
||||
|
||||
if (inst::config::useSound) {
|
||||
std::string audioPath = "";
|
||||
std::string audioPath = "romfs:/audio/pass.mp3";
|
||||
std::string pass = inst::config::appDir + "audio.pass"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(pass)) {
|
||||
audioPath = (pass);
|
||||
}
|
||||
else {
|
||||
audioPath = "romfs:/audio/yipee.wav";
|
||||
}
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(pass)) audioPath = (pass);
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
audioThread.join();
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ namespace nspInstStuff {
|
||||
std::string audioPath = "";
|
||||
std::string fail = inst::config::appDir + "audio.fail"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(fail)) audioPath = (fail);
|
||||
else audioPath = "romfs:/audio/ohno.wav";
|
||||
else audioPath = "romfs:/audio/fail.mp3";
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
audioThread.join();
|
||||
}
|
||||
@ -151,7 +151,7 @@ namespace nspInstStuff {
|
||||
audioPath = (pass);
|
||||
}
|
||||
else {
|
||||
audioPath = "romfs:/audio/yipee.wav";
|
||||
audioPath = "romfs:/audio/pass.mp3";
|
||||
}
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
audioThread.join();
|
||||
|
@ -225,10 +225,9 @@ namespace inst::ui {
|
||||
}
|
||||
else {
|
||||
if (inst::config::useSound) {
|
||||
std::string audioPath = "";
|
||||
std::string audioPath = "romfs:/audio/fail.mp3";
|
||||
std::string fail = inst::config::appDir + "audio.fail"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(fail)) audioPath = (fail);
|
||||
else audioPath = "romfs:/audio/ohno.wav";
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
audioThread.join();
|
||||
}
|
||||
@ -247,10 +246,9 @@ namespace inst::ui {
|
||||
std::filesystem::remove(ourPath);
|
||||
if (didExtract) {
|
||||
if (inst::config::useSound) {
|
||||
std::string audioPath = "";
|
||||
std::string audioPath = "romfs:/audio/pass.mp3";
|
||||
std::string pass = inst::config::appDir + "audio.pass"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(pass)) audioPath = (pass);
|
||||
else audioPath = "romfs:/audio/yipee.wav";
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
audioThread.join();
|
||||
}
|
||||
|
@ -166,14 +166,9 @@ namespace usbInstStuff {
|
||||
inst::ui::instPage::setInstBarPerc(0);
|
||||
|
||||
if (inst::config::useSound) {
|
||||
std::string audioPath = "";
|
||||
std::string audioPath = "romfs:/audio/fail.mp3";
|
||||
std::string fail = inst::config::appDir + "audio.fail"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(fail)) {
|
||||
audioPath = (fail);
|
||||
}
|
||||
else {
|
||||
audioPath = "romfs:/audio/ohno.wav";
|
||||
}
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(fail)) audioPath = (fail);
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
audioThread.join();
|
||||
}
|
||||
@ -194,14 +189,9 @@ namespace usbInstStuff {
|
||||
inst::ui::instPage::setInstBarPerc(100);
|
||||
|
||||
if (inst::config::useSound) {
|
||||
std::string audioPath = "";
|
||||
std::string audioPath = "romfs:/audio/pass.mp3";
|
||||
std::string pass = inst::config::appDir + "audio.pass"_theme;
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(pass)) {
|
||||
audioPath = (pass);
|
||||
}
|
||||
else {
|
||||
audioPath = "romfs:/audio/yipee.wav";
|
||||
}
|
||||
if (inst::config::useTheme && std::filesystem::exists(inst::config::appDir + "/theme/theme.json") && std::filesystem::exists(pass)) audioPath = (pass);
|
||||
std::thread audioThread(inst::util::playAudio, audioPath);
|
||||
audioThread.join();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user