From 3204e5581f7fac3d7b9872d08a37ea5f93c756b7 Mon Sep 17 00:00:00 2001 From: cathery Date: Wed, 6 Nov 2019 18:43:12 +0300 Subject: [PATCH] hiddbg: Adds a function to return tmem directly --- nx/include/switch/services/hiddbg.h | 3 +++ nx/source/services/hiddbg.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/nx/include/switch/services/hiddbg.h b/nx/include/switch/services/hiddbg.h index c5c6c5b7..2863f1cb 100644 --- a/nx/include/switch/services/hiddbg.h +++ b/nx/include/switch/services/hiddbg.h @@ -182,6 +182,9 @@ Result hiddbgAttachHdlsWorkBuffer(void); /// Exit Hdls, must be called at some point prior to hiddbgExit. Only available with [7.0.0+]. Result hiddbgReleaseHdlsWorkBuffer(void); +/// Gets the Tmem pointer. Use only after calling hiddbgAttachHdlsWorkBuffer() +TransferMemory *hiddbgGetWorkBufferTransferMemoryAddress(); + /// Gets state for \ref HiddbgHdlsNpadAssignment. Only available with [7.0.0+]. Result hiddbgDumpHdlsNpadAssignmentState(HiddbgHdlsNpadAssignment *state); diff --git a/nx/source/services/hiddbg.c b/nx/source/services/hiddbg.c index 8494c316..408c038e 100644 --- a/nx/source/services/hiddbg.c +++ b/nx/source/services/hiddbg.c @@ -392,6 +392,11 @@ Result hiddbgReleaseHdlsWorkBuffer(void) { return rc; } +TransferMemory *hiddbgGetWorkBufferTransferMemoryAddress() +{ + return &g_hiddbgHdlsTmem; +} + Result hiddbgDumpHdlsNpadAssignmentState(HiddbgHdlsNpadAssignment *state) { Result rc=0;