Skip to content

Commit

Permalink
Resolve issue #8 soft brick after disabling CFW syscalls
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRouletteBoi committed Apr 14, 2022
1 parent e509b35 commit 2a0f043
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Core/Menu/Overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,15 @@ void Overlay::WaitAndQueueTextInLV2()
{
const int size = MAX_LV2_STRING_SIZE / sizeof(uint64_t);
char text[size][8]{};
vsh::memset(text, 0, sizeof(text));

for (uint64_t i = 0; i < size; i++)
{
uint64_t bytes = PeekLv2(m_NotificationOffsetInLv2 + (i * sizeof(uint64_t)));

if (bytes == 0xFFFFFFFF80010003) // if cfw syscalls are disabled
goto clear_text;

if (bytes != 0)
vsh::memcpy(text[i], &bytes, sizeof(uint64_t));
}
Expand All @@ -170,7 +175,11 @@ void Overlay::WaitAndQueueTextInLV2()
if (text[0] != 0 && text[0][0] != '\0')
m_Lv2Label = reinterpret_cast<char*>(text);
else
m_Lv2Label.clear();
{
clear_text:
if (!m_Lv2Label.empty())
m_Lv2Label.clear();
}
}

void Overlay::UpdateInfoThread(uint64_t arg)
Expand Down

0 comments on commit 2a0f043

Please sign in to comment.