add boost mode option for installing
This commit is contained in:
@@ -189,6 +189,7 @@ public:
|
|||||||
option::OptionBool m_install{INI_SECTION, "install", false};
|
option::OptionBool m_install{INI_SECTION, "install", false};
|
||||||
option::OptionBool m_install_sd{INI_SECTION, "install_sd", true};
|
option::OptionBool m_install_sd{INI_SECTION, "install_sd", true};
|
||||||
option::OptionLong m_install_prompt{INI_SECTION, "install_prompt", true};
|
option::OptionLong m_install_prompt{INI_SECTION, "install_prompt", true};
|
||||||
|
option::OptionLong m_boost_mode{INI_SECTION, "boost_mode", false};
|
||||||
option::OptionBool m_allow_downgrade{INI_SECTION, "allow_downgrade", false};
|
option::OptionBool m_allow_downgrade{INI_SECTION, "allow_downgrade", false};
|
||||||
option::OptionBool m_skip_if_already_installed{INI_SECTION, "skip_if_already_installed", true};
|
option::OptionBool m_skip_if_already_installed{INI_SECTION, "skip_if_already_installed", true};
|
||||||
option::OptionBool m_ticket_only{INI_SECTION, "ticket_only", false};
|
option::OptionBool m_ticket_only{INI_SECTION, "ticket_only", false};
|
||||||
|
|||||||
@@ -71,6 +71,10 @@ enum : Result {
|
|||||||
struct Config {
|
struct Config {
|
||||||
bool sd_card_install{};
|
bool sd_card_install{};
|
||||||
|
|
||||||
|
// sets the performance mode to FastLoad which boosts the CPU clock
|
||||||
|
// and lowers the GPU clock.
|
||||||
|
bool boost_mode{};
|
||||||
|
|
||||||
// enables downgrading patch / data patch (dlc) version.
|
// enables downgrading patch / data patch (dlc) version.
|
||||||
bool allow_downgrade{};
|
bool allow_downgrade{};
|
||||||
|
|
||||||
|
|||||||
@@ -1540,18 +1540,22 @@ void App::DisplayInstallOptions(bool left_side) {
|
|||||||
install_items.push_back("System memory"_i18n);
|
install_items.push_back("System memory"_i18n);
|
||||||
install_items.push_back("microSD card"_i18n);
|
install_items.push_back("microSD card"_i18n);
|
||||||
|
|
||||||
options->Add(std::make_shared<ui::SidebarEntryBool>("Enable"_i18n, App::GetInstallEnable(), [](bool& enable){
|
options->Add(std::make_shared<ui::SidebarEntryBool>("Enable"_i18n, App::GetApp()->m_install.Get(), [](bool& enable){
|
||||||
App::SetInstallEnable(enable);
|
App::GetApp()->m_install.Set(enable);
|
||||||
}, "Enabled"_i18n, "Disabled"_i18n));
|
}, "Enabled"_i18n, "Disabled"_i18n));
|
||||||
|
|
||||||
options->Add(std::make_shared<ui::SidebarEntryBool>("Show install warning"_i18n, App::GetInstallPrompt(), [](bool& enable){
|
options->Add(std::make_shared<ui::SidebarEntryBool>("Show install warning"_i18n, App::GetApp()->m_install_prompt.Get(), [](bool& enable){
|
||||||
App::SetInstallPrompt(enable);
|
App::GetApp()->m_install_prompt.Set(enable);
|
||||||
}, "Enabled"_i18n, "Disabled"_i18n));
|
}, "Enabled"_i18n, "Disabled"_i18n));
|
||||||
|
|
||||||
options->Add(std::make_shared<ui::SidebarEntryArray>("Install location"_i18n, install_items, [](s64& index_out){
|
options->Add(std::make_shared<ui::SidebarEntryArray>("Install location"_i18n, install_items, [](s64& index_out){
|
||||||
App::SetInstallSdEnable(index_out);
|
App::SetInstallSdEnable(index_out);
|
||||||
}, (s64)App::GetInstallSdEnable()));
|
}, (s64)App::GetInstallSdEnable()));
|
||||||
|
|
||||||
|
options->Add(std::make_shared<ui::SidebarEntryBool>("Boost CPU clock"_i18n, App::GetApp()->m_boost_mode.Get(), [](bool& enable){
|
||||||
|
App::GetApp()->m_boost_mode.Set(enable);
|
||||||
|
}, "Enabled"_i18n, "Disabled"_i18n));
|
||||||
|
|
||||||
options->Add(std::make_shared<ui::SidebarEntryBool>("Allow downgrade"_i18n, App::GetApp()->m_allow_downgrade.Get(), [](bool& enable){
|
options->Add(std::make_shared<ui::SidebarEntryBool>("Allow downgrade"_i18n, App::GetApp()->m_allow_downgrade.Get(), [](bool& enable){
|
||||||
App::GetApp()->m_allow_downgrade.Set(enable);
|
App::GetApp()->m_allow_downgrade.Set(enable);
|
||||||
}, "Enabled"_i18n, "Disabled"_i18n));
|
}, "Enabled"_i18n, "Disabled"_i18n));
|
||||||
@@ -1568,11 +1572,11 @@ void App::DisplayInstallOptions(bool left_side) {
|
|||||||
App::GetApp()->m_skip_base.Set(enable);
|
App::GetApp()->m_skip_base.Set(enable);
|
||||||
}, "Enabled"_i18n, "Disabled"_i18n));
|
}, "Enabled"_i18n, "Disabled"_i18n));
|
||||||
|
|
||||||
options->Add(std::make_shared<ui::SidebarEntryBool>("Skip Patch"_i18n, App::GetApp()->m_skip_patch.Get(), [](bool& enable){
|
options->Add(std::make_shared<ui::SidebarEntryBool>("Skip patch"_i18n, App::GetApp()->m_skip_patch.Get(), [](bool& enable){
|
||||||
App::GetApp()->m_skip_patch.Set(enable);
|
App::GetApp()->m_skip_patch.Set(enable);
|
||||||
}, "Enabled"_i18n, "Disabled"_i18n));
|
}, "Enabled"_i18n, "Disabled"_i18n));
|
||||||
|
|
||||||
options->Add(std::make_shared<ui::SidebarEntryBool>("Skip addon"_i18n, App::GetApp()->m_skip_addon.Get(), [](bool& enable){
|
options->Add(std::make_shared<ui::SidebarEntryBool>("Skip dlc"_i18n, App::GetApp()->m_skip_addon.Get(), [](bool& enable){
|
||||||
App::GetApp()->m_skip_addon.Set(enable);
|
App::GetApp()->m_skip_addon.Set(enable);
|
||||||
}, "Enabled"_i18n, "Disabled"_i18n));
|
}, "Enabled"_i18n, "Disabled"_i18n));
|
||||||
|
|
||||||
|
|||||||
@@ -764,10 +764,15 @@ Yati::~Yati() {
|
|||||||
|
|
||||||
serviceClose(std::addressof(es));
|
serviceClose(std::addressof(es));
|
||||||
appletSetMediaPlaybackState(false);
|
appletSetMediaPlaybackState(false);
|
||||||
|
|
||||||
|
if (config.boost_mode) {
|
||||||
|
appletSetCpuBoostMode(ApmCpuBoostMode_Normal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Result Yati::Setup(const ConfigOverride& override) {
|
Result Yati::Setup(const ConfigOverride& override) {
|
||||||
config.sd_card_install = override.sd_card_install.value_or(App::GetApp()->m_install_sd.Get());
|
config.sd_card_install = override.sd_card_install.value_or(App::GetApp()->m_install_sd.Get());
|
||||||
|
config.boost_mode = App::GetApp()->m_boost_mode.Get();
|
||||||
config.allow_downgrade = App::GetApp()->m_allow_downgrade.Get();
|
config.allow_downgrade = App::GetApp()->m_allow_downgrade.Get();
|
||||||
config.skip_if_already_installed = App::GetApp()->m_skip_if_already_installed.Get();
|
config.skip_if_already_installed = App::GetApp()->m_skip_if_already_installed.Get();
|
||||||
config.ticket_only = App::GetApp()->m_ticket_only.Get();
|
config.ticket_only = App::GetApp()->m_ticket_only.Get();
|
||||||
@@ -785,6 +790,10 @@ Result Yati::Setup(const ConfigOverride& override) {
|
|||||||
config.lower_system_version = override.lower_system_version.value_or(App::GetApp()->m_lower_system_version.Get());
|
config.lower_system_version = override.lower_system_version.value_or(App::GetApp()->m_lower_system_version.Get());
|
||||||
storage_id = config.sd_card_install ? NcmStorageId_SdCard : NcmStorageId_BuiltInUser;
|
storage_id = config.sd_card_install ? NcmStorageId_SdCard : NcmStorageId_BuiltInUser;
|
||||||
|
|
||||||
|
if (config.boost_mode) {
|
||||||
|
appletSetCpuBoostMode(ApmCpuBoostMode_FastLoad);
|
||||||
|
}
|
||||||
|
|
||||||
R_TRY(source->GetOpenResult());
|
R_TRY(source->GetOpenResult());
|
||||||
R_TRY(splCryptoInitialize());
|
R_TRY(splCryptoInitialize());
|
||||||
R_TRY(nsInitialize());
|
R_TRY(nsInitialize());
|
||||||
|
|||||||
Reference in New Issue
Block a user