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

Commit

Permalink
fix block home button and some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
D3fau4 committed Nov 21, 2020
1 parent 2b71966 commit 75dd24a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 25 deletions.
56 changes: 36 additions & 20 deletions NightFall/NightFall.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,42 @@
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\amssu\amssu.c" />
<ClCompile Include="source\FS\FS.cpp" />
<ClCompile Include="source\main.cpp" />
<ClCompile Include="source\net\net.cpp" />
<ClCompile Include="source\psm\psm.cpp" />
<ClCompile Include="source\sm\sm.cpp" />
<ClCompile Include="source\spl\spl.cpp" />
<ClCompile Include="source\thread.cpp" />
<ClCompile Include="source\UI\DownloadUpdate.cpp" />
<ClCompile Include="source\UI\InstallUpdate.cpp" />
<ClCompile Include="source\UI\PreInstallUpdate.cpp" />
<ClCompile Include="source\UI\PreOfflineInstall.cpp" />
<ClCompile Include="source\UI\UpToDate.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\amssu\amssu.h" />
<ClInclude Include="include\FS\FS.hpp" />
<ClInclude Include="include\json.hpp" />
<ClInclude Include="include\net\net.hpp" />
<ClInclude Include="include\psm\psm.hpp" />
<ClInclude Include="include\service_guard.h" />
<ClInclude Include="include\sm\sm.hpp" />
<ClInclude Include="include\spl\spl.hpp" />
<ClInclude Include="include\thread.hpp" />
<ClInclude Include="include\Types.hpp" />
<ClInclude Include="include\UI\DownloadUpdate.hpp" />
<ClInclude Include="include\UI\InstallUpdate.hpp" />
<ClInclude Include="include\UI\PreInstallUpdate.hpp" />
<ClInclude Include="include\UI\PreOfflineInstall.hpp" />
<ClInclude Include="include\UI\UI.hpp" />
<ClInclude Include="include\UI\UpToDate.hpp" />
</ItemGroup>
<ItemGroup>
<None Include="Makefile" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{A8B2FDD7-257D-44E6-B723-14EB7BDEAA73}</ProjectGuid>
Expand Down Expand Up @@ -96,26 +132,6 @@
</PropertyGroup>
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="Makefile" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\amssu\amssu.c" />
<ClCompile Include="source\FS\FS.cpp" />
<ClCompile Include="source\main.cpp" />
<ClCompile Include="source\net\net.cpp" />
<ClCompile Include="source\sm\sm.cpp" />
<ClCompile Include="source\spl\spl.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\amssu\amssu.hpp" />
<ClInclude Include="include\FS\FS.hpp" />
<ClInclude Include="include\net\net.hpp" />
<ClInclude Include="include\service_guard.h" />
<ClInclude Include="include\sm\sm.hpp" />
<ClInclude Include="include\spl\spl.hpp" />
<ClInclude Include="include\Types.hpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
2 changes: 0 additions & 2 deletions NightFall/source/UI/DownloadUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ DownloadUpdatePage::DownloadUpdatePage(brls::StagedAppletFrame *frame)
this->label1 = new brls::Label(brls::LabelStyle::DESCRIPTION, "Firmware: " + jso1n["fw_info"]["version"].get<std::string>());
this->label1->setHorizontalAlign(NVG_ALIGN_CENTER);
this->label1->setParent(this);
/* Prevent the home button from being pressed during installation. */
hiddbgDeactivateHomeButton();
}

void DownloadUpdatePage::draw(NVGcontext *vg, int x, int y, unsigned width, unsigned height, brls::Style *style, brls::FrameContext *ctx)
Expand Down
2 changes: 0 additions & 2 deletions NightFall/source/UI/InstallUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ InstallUpdate::InstallUpdate(brls::StagedAppletFrame *frame, std::string label,
this->label1->setParent(this);
brls::Logger::debug(path);
Install.m_path = path;
/* Prevent the home button from being pressed during installation. */
hiddbgDeactivateHomeButton();
}

InstallUpdate::~InstallUpdate()
Expand Down
4 changes: 3 additions & 1 deletion NightFall/source/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ namespace BackGround
}
if (this->m_InstallUpdate == true)
{
/* Prevent the home button from being pressed during installation. */
hiddbgDeactivateHomeButton();
std::ifstream o("/switch/NightFall/config.json");
o >> config;
if (m_UpdateState == UpdateState::NeedsValidate)
Expand Down Expand Up @@ -217,7 +219,7 @@ namespace BackGround
}
if (m_UpdateState == UpdateState::AwaitingReboot)
{
if (config["Exfat"].get<int>() == 1)
if (config["DeleteFolder"].get<int>() == 1)
FS::DeleteDir(this->m_path.c_str());
brls::Logger::debug("Preparado: Reinicio en 3s");
std::this_thread::sleep_for(3s);
Expand Down

0 comments on commit 75dd24a

Please sign in to comment.