From d2c24bbe102ea1bbd8ea8f442be946b3eb3938fd Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 27 Feb 2019 03:39:07 -0800 Subject: [PATCH] pm: Add pmdmntGetServiceSession() --- nx/include/switch/services/pm.h | 3 +++ nx/source/services/pm.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/nx/include/switch/services/pm.h b/nx/include/switch/services/pm.h index 4bb838c9..0491b29c 100644 --- a/nx/include/switch/services/pm.h +++ b/nx/include/switch/services/pm.h @@ -9,6 +9,7 @@ #pragma once #include "../types.h" #include "../kernel/event.h" +#include "../services/sm.h" typedef enum { PmLaunchFlag_None = 0, @@ -48,6 +49,8 @@ typedef struct { Result pmdmntInitialize(void); void pmdmntExit(void); +Service* pmdmntGetServiceSession(void); + Result pminfoInitialize(void); void pminfoExit(void); diff --git a/nx/source/services/pm.c b/nx/source/services/pm.c index e54c83fb..479c8bb5 100644 --- a/nx/source/services/pm.c +++ b/nx/source/services/pm.c @@ -27,6 +27,10 @@ void pmdmntExit(void) } } +Service* pmdmntGetServiceSession(void) { + return &g_pmdmntSrv; +} + Result pminfoInitialize(void) { atomicIncrement64(&g_pminfoRefCnt);