mirror of
https://github.com/libretro/mgba.git
synced 2024-11-27 02:00:42 +00:00
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) {
|
||||
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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user