mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-23 06:57:13 +02:00
add closing emulation(starting a new one is still broken), disabled audio
This commit is contained in:
parent
4ea06abd71
commit
d25e5cefd8
13 changed files with 194 additions and 33 deletions
|
@ -1,6 +1,8 @@
|
|||
using ARMeilleure.Translation;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.HOS.SystemState;
|
||||
using Ryujinx.Input.HLE;
|
||||
using Silk.NET.Vulkan;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
@ -168,5 +170,41 @@ namespace LibRyujinx
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void SignalEmulationClose()
|
||||
{
|
||||
_isStopped = true;
|
||||
_isActive = false;
|
||||
|
||||
debug_break(2);
|
||||
}
|
||||
|
||||
public static void CloseEmulation()
|
||||
{
|
||||
if (SwitchDevice == null)
|
||||
return;
|
||||
|
||||
_npadManager?.Dispose();
|
||||
_npadManager = null;
|
||||
|
||||
_touchScreenManager?.Dispose();
|
||||
_touchScreenManager = null;
|
||||
|
||||
SwitchDevice?.InputManager?.Dispose();
|
||||
SwitchDevice.InputManager = null;
|
||||
_inputManager = null;
|
||||
|
||||
|
||||
_surfaceEvent?.Set();
|
||||
|
||||
if (Renderer != null)
|
||||
{
|
||||
_gpuDoneEvent.WaitOne();
|
||||
_gpuDoneEvent.Dispose();
|
||||
_gpuDoneEvent = null;
|
||||
SwitchDevice?.DisposeContext();
|
||||
Renderer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue