Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Commit 655060e

Browse files
committed
1.1.2 small fix
1 parent 909a050 commit 655060e

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

NightFall/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ include $(DEVKITPRO)/libnx/switch_rules
4040
TARGET := $(notdir $(CURDIR))
4141
APP_TITLE := NightFall
4242
APP_AUTHOR := D3fau4
43-
APP_VERSION := 1.1.1
43+
APP_VERSION := 1.1.2
4444
ICON := resources/icon/NightFall.jpg
4545
BUILD := build
4646
SOURCES := source source/amssu source/sm source/spl source/hid source/FS source/net source/psm source/UI

NightFall/include/spl/spl.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ SOFTWARE.*/
2222

2323
namespace spl {
2424
char *GetHardwareType(void);
25-
bool HasRCMbug(void);
25+
bool HasRCMbugPatched(void);
2626
bool HasEmummc(void);
2727
}

NightFall/source/main.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ void CheckJson()
141141
void CheckHardware()
142142
{
143143
/*Check if is Ipatched/Mariko */
144-
if (spl::GetHardwareType() == "Mariko" || spl::HasRCMbug())
144+
if (spl::GetHardwareType() == "Iowa" || spl::GetHardwareType() == "Hoag" || spl::GetHardwareType() == "Calcio" || spl::HasRCMbugPatched())
145145
{
146-
brls::Logger::error("The software was closed because only works in non-patched/mariko");
146+
brls::Logger::error("Mariko or patched unit detected");
147147
is_patched = true;
148148
}
149149
else
@@ -154,6 +154,7 @@ void CheckHardware()
154154
{
155155
brls::Logger::debug("Have Emummc");
156156
HasEmummc = true;
157+
is_patched = false;
157158
}
158159
else
159160
{
@@ -250,12 +251,15 @@ int main(int argc, char *argv[])
250251
onlineupdate = false;
251252
}
252253

254+
brls::Logger::debug(j["Firmwver"].get<std::string>());
255+
brls::Logger::debug(ver.display_version);
256+
253257
brls::ListItem *UpdateOnlineItem = new brls::ListItem("main/tabs/Firmware/update/title"_i18n.c_str(), firmwarever);
254258
UpdateOnlineItem->getClickEvent()->subscribe([](brls::View *view) {
255259
//download
256260
brls::StagedAppletFrame *stagedFrame = new brls::StagedAppletFrame();
257261
stagedFrame->setTitle("main/tabs/Firmware/update/title"_i18n.c_str());
258-
if (onlineupdate == true && is_patched == false && HasEmummc == true && psm::GetBatteryState() > 15)
262+
if (onlineupdate == true && is_patched == false && psm::GetBatteryState() >= 15)
259263
{
260264
Network::Net net = Network::Net();
261265
std::string download = Conf["URL"].get<std::string>() + j["intfw"].get<std::string>();
@@ -272,7 +276,7 @@ int main(int argc, char *argv[])
272276
{
273277
stagedFrame->addStage(new UpToDate(stagedFrame, "main/tabs/Firmware/update/update_lowbattery"_i18n.c_str()));
274278
}
275-
if (is_patched == false)
279+
else if (is_patched == false)
276280
{
277281
stagedFrame->addStage(new UpToDate(stagedFrame, "main/tabs/Firmware/update/update_uptodate"_i18n.c_str()));
278282
}

NightFall/source/spl/spl.cpp

+14-6
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,33 @@ namespace spl
3232
Result ret = 0;
3333
u64 hardware_type = 4;
3434
char *hardware[] = {
35-
"Icosa",
36-
"Copper",
37-
"Hoag",
38-
"Mariko",
35+
"Icosa", // Erista normal
36+
"Copper", // Erista prototype
37+
"Hoag", // Mariko lite
38+
"Iowa", // Mariko retail
39+
"Calcio", // Mariko prototype
3940
"Unknown"};
4041

4142
if (R_FAILED(ret = splGetConfig(SplConfigItem_HardwareType, &hardware_type)))
4243
{
4344
return hardware[4];
4445
}
4546
else
46-
4747
return hardware[hardware_type];
4848
}
4949

50-
bool HasRCMbug(void)
50+
bool HasRCMbugPatched(void)
5151
{
5252
Result ret = 0;
5353
u64 has_rcm_bug_patch;
5454
if (R_SUCCEEDED(ret = splGetConfig(static_cast<SplConfigItem>(ExosphereHasRcmBugPatch), &has_rcm_bug_patch)))
5555
{
5656
return has_rcm_bug_patch;
5757
}
58+
else
59+
{
60+
return has_rcm_bug_patch;
61+
}
5862
}
5963

6064
bool HasEmummc(void)
@@ -66,5 +70,9 @@ namespace spl
6670
{
6771
return IsEmummc;
6872
}
73+
else
74+
{
75+
return IsEmummc;
76+
}
6977
}
7078
} // namespace spl

0 commit comments

Comments
 (0)