n64: Unload and save before reset() on gamepad and disk (#1464)

7ad14ff6bf
inadvertently made it so that .pak saves (and other save data) are not
properly persisted to disk when unloading the n64 core. This PR resolves
that, calling `unload()`, which itself calls `save()`, before resetting
the gamepad and other memory.

Co-authored-by: jcm <butt@butts.com>
このコミットが含まれているのは:
jcm 2024-04-30 04:43:07 -05:00 committed by GitHub
コミット 1b3e826575
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: B5690EEEBB952194
1個のファイルの変更2行の追加1行の削除

ファイルの表示

@ -193,11 +193,12 @@ auto Nintendo64::load(Menu menu) -> void {
}
auto Nintendo64::unload() -> void {
Emulator::unload();
gamepad.reset();
disk.reset();
gb.reset();
Emulator::unload();
diskInsertTimer.reset();
}