apt: Added aptClearHomePressRejected func

This commit is contained in:
fangrong 2024-10-29 13:57:24 +08:00
parent a88b5af7a8
commit de15ac9566
2 changed files with 9 additions and 0 deletions

View File

@ -175,6 +175,9 @@ bool aptShouldJumpToHome(void);
/// Returns true if there is an incoming HOME button press rejected by the policy set by \ref aptSetHomeAllowed (use this to show a "no HOME allowed" icon).
bool aptCheckHomePressRejected(void);
/// Clear the incoming HOME button press rejected flag.
void aptClearHomePressRejected(void);
/// \deprecated Alias for \ref aptCheckHomePressRejected.
static inline CTR_DEPRECATED bool aptIsHomePressed(void)
{

View File

@ -308,6 +308,12 @@ bool aptCheckHomePressRejected(void)
return false;
}
void aptClearHomePressRejected(void)
{
if (aptFlags & FLAG_HOMEREJECTED)
aptFlags &= ~FLAG_HOMEREJECTED;
}
static void aptClearJumpToHome(void)
{
aptHomeButtonState = 0;