diff --git a/arm9/source/main.c b/arm9/source/main.c index 4d6e8d7..36be0c0 100644 --- a/arm9/source/main.c +++ b/arm9/source/main.c @@ -7,6 +7,7 @@ #include "hid.h" +SystemSHMEM *shmemGlobalBase; void main(int argc, char** argv, int entrypoint) { diff --git a/common/shmem.h b/common/shmem.h index 39b5255..e377e2f 100755 --- a/common/shmem.h +++ b/common/shmem.h @@ -36,13 +36,15 @@ typedef struct { #ifdef ARM9 #include +extern SystemSHMEM *shmemGlobalBase; + static inline SystemSHMEM *ARM_GetSHMEM(void) { - return (SystemSHMEM*)ARM_GetTID(); + return shmemGlobalBase; } static inline void ARM_InitSHMEM(void) { - ARM_SetTID(PXI_DoCMD(PXI_GET_SHMEM, NULL, 0)); + shmemGlobalBase = (SystemSHMEM*)PXI_DoCMD(PXI_GET_SHMEM, NULL, 0); } #endif