From 9fa0a7f1da1b70bee995f53c6c96c43189018772 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Wed, 1 Feb 2023 18:45:02 -0400 Subject: global: Import Dolphin SDK This version comes from the Metroid Prime decompilation project. https://github.com/PrimeDecomp/prime --- src/Dolphin/GBA/GBAGetProcessStatus.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/Dolphin/GBA/GBAGetProcessStatus.c (limited to 'src/Dolphin/GBA/GBAGetProcessStatus.c') diff --git a/src/Dolphin/GBA/GBAGetProcessStatus.c b/src/Dolphin/GBA/GBAGetProcessStatus.c new file mode 100644 index 0000000..38d8c38 --- /dev/null +++ b/src/Dolphin/GBA/GBAGetProcessStatus.c @@ -0,0 +1,25 @@ +#include "dolphin/GBAPriv.h" + +s32 GBAGetProcessStatus(s32 chan, u8* percentp) { + GBA* gba; + s32 ret; + BOOL enabled; + + gba = &__GBA[chan]; + enabled = OSDisableInterrupts(); + + if (gba->jboot_callback == NULL) { + if (gba->callback == NULL) { + ret = 0; + } else { + ret = 2; + } + } else { + ret = 2; + + } + + OSRestoreInterrupts(enabled); + + return ret; +} -- cgit v1.2.3-13-gbd6f