mirror of https://github.com/mgba-emu/mgba.git
Scripting: Detach adapter peripherals when detaching adapter
This commit is contained in:
parent
82f7e52fc6
commit
a82c390fe9
|
@ -1053,7 +1053,11 @@ void mScriptContextDetachCore(struct mScriptContext* context) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_clearMemoryMap(context, value->value.opaque, true);
|
|
||||||
|
struct mScriptCoreAdapter* adapter = value->value.opaque;
|
||||||
|
_clearMemoryMap(context, adapter, true);
|
||||||
|
adapter->core->setPeripheral(adapter->core, mPERIPH_RUMBLE, adapter->oldRumble);
|
||||||
|
|
||||||
mScriptContextRemoveGlobal(context, "emu");
|
mScriptContextRemoveGlobal(context, "emu");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue