formatting

This commit is contained in:
cathery 2019-11-07 20:23:15 +03:00
parent 9362e2be4d
commit b3e7bf4f5a

View File

@ -403,30 +403,22 @@ Result hiddbgIsHdlsVirtualDeviceAttached(u64 HdlsHandle, bool *isAttached)
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized); return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
rc = _hiddbgCmdNoIO(327); rc = _hiddbgCmdNoIO(327);
if (R_FAILED(rc)) if (R_FAILED(rc)) return rc;
return rc; if (isAttached) {
if (isAttached)
{
*isAttached = false; *isAttached = false;
if (hosversionBefore(9, 0, 0)) if (hosversionBefore(9, 0, 0)) {
{
HiddbgHdlsStateListV7 *stateList = (HiddbgHdlsStateListV7 *)(g_hiddbgHdlsTmem.src_addr); HiddbgHdlsStateListV7 *stateList = (HiddbgHdlsStateListV7 *)(g_hiddbgHdlsTmem.src_addr);
for (s32 i = 0; i < stateList->total_entries; i++) for (s32 i = 0; i < stateList->total_entries; i++) {
{ if (stateList->entries[i].HdlsHandle == HdlsHandle) {
if (stateList->entries[i].HdlsHandle == HdlsHandle)
{
*isAttached = true; *isAttached = true;
break; break;
} }
} }
} }
else else {
{
HiddbgHdlsStateList *stateList = (HiddbgHdlsStateList *)(g_hiddbgHdlsTmem.src_addr); HiddbgHdlsStateList *stateList = (HiddbgHdlsStateList *)(g_hiddbgHdlsTmem.src_addr);
for (s32 i = 0; i < stateList->total_entries; i++) for (s32 i = 0; i < stateList->total_entries; i++) {
{ if (stateList->entries[i].HdlsHandle == HdlsHandle) {
if (stateList->entries[i].HdlsHandle == HdlsHandle)
{
*isAttached = true; *isAttached = true;
break; break;
} }