mirror of https://github.com/mgba-emu/mgba.git
Scripting: Expose MD5 checksum
This commit is contained in:
parent
39ced7dd81
commit
9f5c2aa00c
|
@ -350,6 +350,9 @@ static struct mScriptValue* _mScriptCoreChecksum(const struct mCore* core, int t
|
|||
case mCHECKSUM_CRC32:
|
||||
size = 4;
|
||||
break;
|
||||
case mCHECKSUM_MD5:
|
||||
size = 16;
|
||||
break;
|
||||
}
|
||||
if (!size) {
|
||||
return &mScriptValueNull;
|
||||
|
|
|
@ -130,6 +130,7 @@ void mScriptContextAttachStdlib(struct mScriptContext* context) {
|
|||
});
|
||||
mScriptContextExportConstants(context, "CHECKSUM", (struct mScriptKVPair[]) {
|
||||
mSCRIPT_CONSTANT_PAIR(mCHECKSUM, CRC32),
|
||||
mSCRIPT_CONSTANT_PAIR(mCHECKSUM, MD5),
|
||||
mSCRIPT_KV_SENTINEL
|
||||
});
|
||||
#ifdef M_CORE_GBA
|
||||
|
|
Loading…
Reference in New Issue