stratosphere: more result cleanup

This commit is contained in:
Michael Scire
2019-06-20 02:00:59 -07:00
parent 7b6050a0cb
commit cead8a36ea
38 changed files with 158 additions and 448 deletions

View File

@@ -26,11 +26,13 @@ Result HidManagement::GetKeysHeld(u64 *keys) {
}
if (!serviceIsActive(hidGetSessionService())) {
Result rc;
bool initialized = false;
DoWithSmSession([&]() {
rc = hidInitialize();
if (R_SUCCEEDED(hidInitialize())) {
initialized = true;
}
});
if (R_FAILED(rc)) {
if (!initialized) {
return MAKERESULT(Module_Libnx, LibnxError_InitFail_HID);
}
}