summaryrefslogtreecommitdiff
path: root/src/Dolphin/GBA/GBAGetProcessStatus.c
blob: 38d8c38850c9ae7b616773292ee9337d3068133a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
}