mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-05 19:51:45 +00:00
loader/ams_mitm: hidKeysHeld, not hidKeysDown (and remove workaround)
This commit is contained in:
parent
7551bebb88
commit
83626923cf
2 changed files with 7 additions and 7 deletions
|
@ -220,8 +220,6 @@ void Utils::InitializeThreadFunc(void *args) {
|
|||
}
|
||||
|
||||
g_has_hid_session = true;
|
||||
|
||||
hidExit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -449,14 +447,13 @@ bool Utils::HasSdDisableMitMFlag(u64 tid) {
|
|||
}
|
||||
|
||||
Result Utils::GetKeysDown(u64 *keys) {
|
||||
if (!Utils::IsHidAvailable() || R_FAILED(hidInitialize())) {
|
||||
if (!Utils::IsHidAvailable()) {
|
||||
return MAKERESULT(Module_Libnx, LibnxError_InitFail_HID);
|
||||
}
|
||||
|
||||
hidScanInput();
|
||||
*keys = hidKeysDown(CONTROLLER_P1_AUTO);
|
||||
*keys = hidKeysHeld(CONTROLLER_P1_AUTO);
|
||||
|
||||
hidExit();
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,13 +21,16 @@
|
|||
#include "ldr_hid.hpp"
|
||||
|
||||
Result HidManagement::GetKeysDown(u64 *keys) {
|
||||
if (!ContentManagement::HasCreatedTitle(0x0100000000000013) || R_FAILED(hidInitialize())) {
|
||||
if (!ContentManagement::HasCreatedTitle(0x0100000000000013)) {
|
||||
return MAKERESULT(Module_Libnx, LibnxError_InitFail_HID);
|
||||
}
|
||||
|
||||
if (!serviceIsActive(hidGetSessionService()) && R_FAILED(hidInitialize())) {
|
||||
return MAKERESULT(Module_Libnx, LibnxError_InitFail_HID);
|
||||
}
|
||||
|
||||
hidScanInput();
|
||||
*keys = hidKeysDown(CONTROLLER_P1_AUTO);
|
||||
|
||||
hidExit();
|
||||
return 0x0;
|
||||
}
|
Loading…
Reference in a new issue