aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-06-19 22:08:35 +0200
committerArisotura <thetotalworm@gmail.com>2019-06-19 22:08:35 +0200
commit95f4c1472b5c3d08d82b42747da397c19d8916ec (patch)
tree1246f52725ea5f63e19b0ddcee190272901155bf /src
parent3807c9bf5b19bbea6eb10c12734a17e0c55b4f51 (diff)
probably betterer like this
Diffstat (limited to 'src')
-rw-r--r--src/DSi_AES.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/DSi_AES.cpp b/src/DSi_AES.cpp
index 9f48519..ced8d1a 100644
--- a/src/DSi_AES.cpp
+++ b/src/DSi_AES.cpp
@@ -222,18 +222,6 @@ void WriteInputFIFO(u32 val)
if (!(Cnt & (1<<31))) return;
Update();
-
- if (RemBlocks == 0)
- {
- Cnt &= ~(1<<31);
- if (Cnt & (1<<30)) NDS::SetIRQ2(NDS::IRQ2_DSi_AES);
- DSi::StopNDMAs(1, 0x2A);
- DSi::StopNDMAs(1, 0x2B);
- }
- else
- {
- CheckInputDMA();
- }
}
void CheckInputDMA()
@@ -276,6 +264,14 @@ void Update()
}
CheckOutputDMA();
+
+ if (RemBlocks == 0)
+ {
+ Cnt &= ~(1<<31);
+ if (Cnt & (1<<30)) NDS::SetIRQ2(NDS::IRQ2_DSi_AES);
+ DSi::StopNDMAs(1, 0x2A);
+ DSi::StopNDMAs(1, 0x2B);
+ }
}