mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-17 03:26:34 +00:00
Compare commits
3 Commits
a4895e7f08
...
39e4b3d85a
Author | SHA1 | Date | |
---|---|---|---|
|
39e4b3d85a | ||
|
7d158acc3b | ||
|
c93aaebd4e |
@ -743,7 +743,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||
constantBufferUsePerStageMask &= ~(1 << index);
|
||||
}
|
||||
|
||||
if (checkTextures)
|
||||
if (checkTextures && _allTextures.Length > 0)
|
||||
{
|
||||
TexturePool pool = channel.TextureManager.GetTexturePool(poolState.TexturePoolGpuVa, poolState.TexturePoolMaximumId);
|
||||
|
||||
|
@ -21,6 +21,7 @@ using Ryujinx.Graphics.GAL.Multithreading;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.HLE.HOS;
|
||||
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||
using Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy;
|
||||
using Ryujinx.HLE.HOS.SystemState;
|
||||
using Ryujinx.Input.GTK3;
|
||||
using Ryujinx.Input.HLE;
|
||||
@ -677,7 +678,8 @@ namespace Ryujinx.UI
|
||||
ConfigurationState.Instance.System.AudioVolume,
|
||||
ConfigurationState.Instance.System.UseHypervisor,
|
||||
ConfigurationState.Instance.Multiplayer.LanInterfaceId.Value,
|
||||
ConfigurationState.Instance.Multiplayer.Mode);
|
||||
ConfigurationState.Instance.Multiplayer.Mode,
|
||||
() => StopEmulation());
|
||||
|
||||
_emulationContext = new HLE.Switch(configuration);
|
||||
}
|
||||
@ -1484,7 +1486,7 @@ namespace Ryujinx.UI
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
private void StopEmulation_Pressed(object sender, EventArgs args)
|
||||
private void StopEmulation()
|
||||
{
|
||||
if (_emulationContext != null)
|
||||
{
|
||||
@ -1497,6 +1499,16 @@ namespace Ryujinx.UI
|
||||
RendererWidget?.Exit();
|
||||
}
|
||||
|
||||
private void StopEmulation_Pressed(object sender, EventArgs args)
|
||||
{
|
||||
_emulationContext.System.RequestExit();
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(5000);
|
||||
StopEmulation();
|
||||
});
|
||||
}
|
||||
|
||||
private void PauseEmulation_Pressed(object sender, EventArgs args)
|
||||
{
|
||||
_pauseEmulation.Sensitive = false;
|
||||
|
@ -169,6 +169,11 @@ namespace Ryujinx.HLE
|
||||
/// </summary>
|
||||
public Action RefreshInputConfig { internal get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// An action to stop emulation.
|
||||
/// </summary>
|
||||
public Action Stop { internal get; set; }
|
||||
|
||||
public HLEConfiguration(VirtualFileSystem virtualFileSystem,
|
||||
LibHacHorizonManager libHacHorizonManager,
|
||||
ContentManager contentManager,
|
||||
@ -194,7 +199,8 @@ namespace Ryujinx.HLE
|
||||
float audioVolume,
|
||||
bool useHypervisor,
|
||||
string multiplayerLanInterfaceId,
|
||||
MultiplayerMode multiplayerMode)
|
||||
MultiplayerMode multiplayerMode,
|
||||
Action stop)
|
||||
{
|
||||
VirtualFileSystem = virtualFileSystem;
|
||||
LibHacHorizonManager = libHacHorizonManager;
|
||||
@ -222,6 +228,7 @@ namespace Ryujinx.HLE
|
||||
UseHypervisor = useHypervisor;
|
||||
MultiplayerLanInterfaceId = multiplayerLanInterfaceId;
|
||||
MultiplayerMode = multiplayerMode;
|
||||
Stop = stop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -329,6 +329,12 @@ namespace Ryujinx.HLE.HOS
|
||||
AppletState.SetFocus(true);
|
||||
}
|
||||
|
||||
public void RequestExit()
|
||||
{
|
||||
AppletState.Messages.Enqueue(AppletMessage.Exit);
|
||||
AppletState.MessageEvent.ReadableEvent.Signal();
|
||||
}
|
||||
|
||||
public void SimulateWakeUpMessage()
|
||||
{
|
||||
AppletState.Messages.Enqueue(AppletMessage.Resume);
|
||||
|
@ -51,7 +51,9 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
||||
// Exit()
|
||||
public ResultCode Exit(ServiceCtx context)
|
||||
{
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
||||
Logger.Warning?.Print(LogClass.ServiceAm, "Self Applet Exit");
|
||||
|
||||
context.Device.Configuration.Stop();
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -580,7 +580,8 @@ namespace Ryujinx.Headless.SDL2
|
||||
options.AudioVolume,
|
||||
options.UseHypervisor ?? true,
|
||||
options.MultiplayerLanInterfaceId,
|
||||
Common.Configuration.Multiplayer.MultiplayerMode.Disabled);
|
||||
Common.Configuration.Multiplayer.MultiplayerMode.Disabled,
|
||||
() => _window.Exit());
|
||||
|
||||
return new Switch(configuration);
|
||||
}
|
||||
|
@ -221,7 +221,12 @@ namespace Ryujinx.Headless.SDL2
|
||||
break;
|
||||
|
||||
case SDL_WindowEventID.SDL_WINDOWEVENT_CLOSE:
|
||||
Exit();
|
||||
Device.System.RequestExit();
|
||||
/*
|
||||
SDL2Driver.Instance.AddTimer(5000, () => {
|
||||
Exit();
|
||||
});
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ namespace Ryujinx.SDL2.Common
|
||||
|
||||
public static Action<Action> MainThreadDispatcher { get; set; }
|
||||
|
||||
private const uint SdlInitFlags = SDL_INIT_EVENTS | SDL_INIT_GAMECONTROLLER | SDL_INIT_JOYSTICK | SDL_INIT_AUDIO | SDL_INIT_VIDEO;
|
||||
private const uint SdlInitFlags = SDL_INIT_EVENTS | SDL_INIT_GAMECONTROLLER | SDL_INIT_JOYSTICK | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_TIMER;
|
||||
|
||||
private bool _isRunning;
|
||||
private uint _refereceCount;
|
||||
|
@ -872,7 +872,8 @@ namespace Ryujinx.Ava
|
||||
ConfigurationState.Instance.System.AudioVolume,
|
||||
ConfigurationState.Instance.System.UseHypervisor,
|
||||
ConfigurationState.Instance.Multiplayer.LanInterfaceId.Value,
|
||||
ConfigurationState.Instance.Multiplayer.Mode);
|
||||
ConfigurationState.Instance.Multiplayer.Mode,
|
||||
() => Stop());
|
||||
|
||||
Device = new Switch(configuration);
|
||||
}
|
||||
@ -1092,7 +1093,12 @@ namespace Ryujinx.Ava
|
||||
|
||||
if (shouldExit)
|
||||
{
|
||||
Stop();
|
||||
Device.System.RequestExit();
|
||||
Task.Run(async () =>
|
||||
{
|
||||
await Task.Delay(5000);
|
||||
Stop();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user