mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-25 03:36:02 +00:00
hid: fix sm usage
This commit is contained in:
parent
fd1a39996e
commit
ee2e9d50fd
1 changed files with 2 additions and 4 deletions
|
@ -40,14 +40,12 @@ namespace ams::hid {
|
||||||
|
|
||||||
/* Helper. */
|
/* Helper. */
|
||||||
void InitializeHid() {
|
void InitializeHid() {
|
||||||
R_ABORT_UNLESS(smInitialize());
|
sm::DoWithSession([&]() {
|
||||||
ON_SCOPE_EXIT { smExit(); };
|
|
||||||
{
|
|
||||||
R_ABORT_UNLESS(hidInitialize());
|
R_ABORT_UNLESS(hidInitialize());
|
||||||
hidInitializeNpad();
|
hidInitializeNpad();
|
||||||
R_ABORT_UNLESS(hidSetSupportedNpadIdType(NpadIdTypes, NumNpadIdTypes));
|
R_ABORT_UNLESS(hidSetSupportedNpadIdType(NpadIdTypes, NumNpadIdTypes));
|
||||||
R_ABORT_UNLESS(hidSetSupportedNpadStyleSet(HidNpadStyleSet_NpadStandard | HidNpadStyleTag_NpadSystemExt));
|
R_ABORT_UNLESS(hidSetSupportedNpadStyleSet(HidNpadStyleSet_NpadStandard | HidNpadStyleTag_NpadSystemExt));
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Result EnsureHidInitialized() {
|
Result EnsureHidInitialized() {
|
||||||
|
|
Loading…
Reference in a new issue