summaryrefslogtreecommitdiff
path: root/src/Dolphin/GBA/GBAGetProcessStatus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Dolphin/GBA/GBAGetProcessStatus.c')
-rw-r--r--src/Dolphin/GBA/GBAGetProcessStatus.c25
1 files changed, 25 insertions, 0 deletions
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;
+}