mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-06 19:32:15 +02:00
Do not store the home button event
This commit is contained in:
parent
a812549802
commit
13e9da3962
@ -83,8 +83,6 @@ static Result _appletSelfExit(void);
|
|||||||
|
|
||||||
static Result _appletExitProcessAndReturn(void);
|
static Result _appletExitProcessAndReturn(void);
|
||||||
|
|
||||||
static Event HomeButtonReaderLockAccessorEvent = {0};
|
|
||||||
|
|
||||||
Result appletInitialize(void)
|
Result appletInitialize(void)
|
||||||
{
|
{
|
||||||
atomicIncrement64(&g_refCnt);
|
atomicIncrement64(&g_refCnt);
|
||||||
@ -317,8 +315,6 @@ void appletExit(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eventClose(&HomeButtonReaderLockAccessorEvent);
|
|
||||||
|
|
||||||
eventClose(&g_appletLibraryAppletLaunchableEvent);
|
eventClose(&g_appletLibraryAppletLaunchableEvent);
|
||||||
|
|
||||||
eventClose(&g_appletMessageEvent);
|
eventClose(&g_appletMessageEvent);
|
||||||
@ -1401,21 +1397,12 @@ Result appletEndToWatchShortHomeButtonMessage(void) {
|
|||||||
// ICommonStateGetter
|
// ICommonStateGetter
|
||||||
|
|
||||||
Result appletHomeButtonReaderLockAccessorGetEvent(Event *out_event) {
|
Result appletHomeButtonReaderLockAccessorGetEvent(Event *out_event) {
|
||||||
if (eventActive(&HomeButtonReaderLockAccessorEvent))
|
|
||||||
{
|
|
||||||
*out_event = HomeButtonReaderLockAccessorEvent;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Service ILockAccessor = {0};
|
Service ILockAccessor = {0};
|
||||||
Result rc = _appletGetSession(&g_appletICommonStateGetter, &ILockAccessor, 30);
|
Result rc = _appletGetSession(&g_appletICommonStateGetter, &ILockAccessor, 30);
|
||||||
if (R_FAILED(rc))
|
if (R_FAILED(rc))
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
rc = _appletGetEvent(&ILockAccessor, &HomeButtonReaderLockAccessorEvent, 3, false);
|
rc = _appletGetEvent(&ILockAccessor, out_event, 3, false);
|
||||||
if (R_SUCCEEDED(rc))
|
|
||||||
*out_event = HomeButtonReaderLockAccessorEvent;
|
|
||||||
|
|
||||||
serviceClose(&ILockAccessor);
|
serviceClose(&ILockAccessor);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user