fix hbmenu restore prompt not triggering if /hbmenu.nro does not exist

fixes #99
This commit is contained in:
ITotalJustice
2025-01-16 21:28:13 +00:00
parent b6304fca75
commit a3a2a04991

View File

@@ -631,13 +631,11 @@ void App::SetReplaceHbmenuEnable(bool enable) {
g_app->m_replace_hbmenu.Set(enable); g_app->m_replace_hbmenu.Set(enable);
if (!enable) { if (!enable) {
// check we have already replaced hbmenu with sphaira // check we have already replaced hbmenu with sphaira
NacpStruct hbmenu_nacp; NacpStruct hbmenu_nacp{};
if (R_FAILED(nro_get_nacp("/hbmenu.nro", hbmenu_nacp))) { if (R_SUCCEEDED(nro_get_nacp("/hbmenu.nro", hbmenu_nacp))) {
return; if (std::strcmp(hbmenu_nacp.lang[0].name, "sphaira")) {
} return;
}
if (std::strcmp(hbmenu_nacp.lang[0].name, "sphaira")) {
return;
} }
// ask user if they want to restore hbmenu // ask user if they want to restore hbmenu