Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fcb7425770 | |||
| e676fd8b17 | |||
| dd16e3cee1 | |||
| 31e5f74e05 | |||
| f2f099bddb | |||
| 2616dc57fb | |||
| 0cdf7cfe21 | |||
| 2ecf999569 | |||
| b612fc5155 | |||
| 25eb545409 | |||
| 52269964b6 | |||
| ccdddac8fc | |||
| 1bc30bf3ba | |||
| 4868fface8 | |||
| 6fca4492d0 | |||
| ade2f256e0 | |||
| 580b150c9a | |||
| e6bad52945 | |||
| 6b44f32448 | |||
| e849f94a2e | |||
| 62f3f5414f | |||
| cd7fbf60f8 |
@@ -22,7 +22,7 @@ body:
|
|||||||
id: log
|
id: log
|
||||||
attributes:
|
attributes:
|
||||||
label: Log file
|
label: Log file
|
||||||
description: A log file will help our developers to better diagnose and fix the issue.
|
description: "A log file will help our developers to better diagnose and fix the issue. UPLOAD THE FILE. DO NOT COPY AND PASTE THE FILE'S CONTENT."
|
||||||
placeholder: Logs files can be found under "Logs" folder in Ryujinx program folder. They can also be accessed by opening Ryujinx, then going to File > Open Logs Folder. You can drag and drop the log on to the text area (do not copy paste).
|
placeholder: Logs files can be found under "Logs" folder in Ryujinx program folder. They can also be accessed by opening Ryujinx, then going to File > Open Logs Folder. You can drag and drop the log on to the text area (do not copy paste).
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Gommon;
|
using Gommon;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -47,6 +47,9 @@ namespace Ryujinx.Common
|
|||||||
|
|
||||||
public static readonly string[] DiscordGameAssetKeys =
|
public static readonly string[] DiscordGameAssetKeys =
|
||||||
[
|
[
|
||||||
|
"010008900705c000", // Dragon Quest Builders
|
||||||
|
"010042000a986000", // Dragon Quest Builders 2
|
||||||
|
|
||||||
"010055d009f78000", // Fire Emblem: Three Houses
|
"010055d009f78000", // Fire Emblem: Three Houses
|
||||||
"0100a12011cc8000", // Fire Emblem: Shadow Dragon
|
"0100a12011cc8000", // Fire Emblem: Shadow Dragon
|
||||||
"0100a6301214e000", // Fire Emblem Engage
|
"0100a6301214e000", // Fire Emblem Engage
|
||||||
@@ -105,17 +108,18 @@ namespace Ryujinx.Common
|
|||||||
"0100f4c009322000", // Pikmin 3 Deluxe
|
"0100f4c009322000", // Pikmin 3 Deluxe
|
||||||
"0100b7c00933a000", // Pikmin 4
|
"0100b7c00933a000", // Pikmin 4
|
||||||
|
|
||||||
|
"0100f4300bf2c000", // New Pokémon Snap
|
||||||
|
"0100000011d90000", // Pokémon Brilliant Diamond
|
||||||
|
"01001f5010dfa000", // Pokémon Legends: Arceus
|
||||||
"010003f003a34000", // Pokémon: Let's Go Pikachu!
|
"010003f003a34000", // Pokémon: Let's Go Pikachu!
|
||||||
"0100187003a36000", // Pokémon: Let's Go Eevee!
|
"0100187003a36000", // Pokémon: Let's Go Eevee!
|
||||||
"0100abf008968000", // Pokémon Sword
|
"01003d200baa2000", // Pokémon Mystery Dungeon - Rescue Team DX
|
||||||
"01008db008c2c000", // Pokémon Shield
|
|
||||||
"0100000011d90000", // Pokémon Brilliant Diamond
|
|
||||||
"010018e011d92000", // Pokémon Shining Pearl
|
|
||||||
"01001f5010dfa000", // Pokémon Legends: Arceus
|
|
||||||
"0100a3d008c5c000", // Pokémon Scarlet
|
"0100a3d008c5c000", // Pokémon Scarlet
|
||||||
|
"01008db008c2c000", // Pokémon Shield
|
||||||
|
"010018e011d92000", // Pokémon Shining Pearl
|
||||||
|
"0100abf008968000", // Pokémon Sword
|
||||||
"01008f6008c5e000", // Pokémon Violet
|
"01008f6008c5e000", // Pokémon Violet
|
||||||
"0100b3f000be2000", // Pokkén Tournament DX
|
"0100b3f000be2000", // Pokkén Tournament DX
|
||||||
"0100f4300bf2c000", // New Pokémon Snap
|
|
||||||
|
|
||||||
"01003bc0000a0000", // Splatoon 2 (US)
|
"01003bc0000a0000", // Splatoon 2 (US)
|
||||||
"0100f8f0000a2000", // Splatoon 2 (EU)
|
"0100f8f0000a2000", // Splatoon 2 (EU)
|
||||||
@@ -165,13 +169,21 @@ namespace Ryujinx.Common
|
|||||||
"01005ea01c0fc000", // SONIC X SHADOW GENERATIONS
|
"01005ea01c0fc000", // SONIC X SHADOW GENERATIONS
|
||||||
"01005ea01c0fc001", // ^
|
"01005ea01c0fc001", // ^
|
||||||
|
|
||||||
|
"0100ff500e34a000", // Xenoblade Chronicles - Definitive Edition
|
||||||
|
"0100e95004038000", // Xenoblade Chronicles 2
|
||||||
|
"010074f013262000", // Xenoblade Chronicles 3
|
||||||
|
|
||||||
"010056e00853a000", // A Hat in Time
|
"010056e00853a000", // A Hat in Time
|
||||||
|
"0100fd1014726000", // Baldurs Gate: Dark Alliance
|
||||||
"0100dbf01000a000", // Burnout Paradise Remastered
|
"0100dbf01000a000", // Burnout Paradise Remastered
|
||||||
"0100744001588000", // Cars 3: Driven to Win
|
"0100744001588000", // Cars 3: Driven to Win
|
||||||
"0100b41013c82000", // Cruis'n Blast
|
"0100b41013c82000", // Cruis'n Blast
|
||||||
|
"010085900337e000", // Death Squared
|
||||||
"01001b300b9be000", // Diablo III: Eternal Collection
|
"01001b300b9be000", // Diablo III: Eternal Collection
|
||||||
"01008c8012920000", // Dying Light Platinum Edition
|
"01008c8012920000", // Dying Light Platinum Edition
|
||||||
"01001cc01b2d4000", // Goat Simulator 3
|
"01001cc01b2d4000", // Goat Simulator 3
|
||||||
|
"01003620068ea000", // Hand of Fate 2
|
||||||
|
"010085500130a000", // Lego City: Undercover
|
||||||
"010073c01af34000", // LEGO Horizon Adventures
|
"010073c01af34000", // LEGO Horizon Adventures
|
||||||
"0100770008dd8000", // Monster Hunter Generations Ultimate
|
"0100770008dd8000", // Monster Hunter Generations Ultimate
|
||||||
"0100b04011742000", // Monster Hunter Rise
|
"0100b04011742000", // Monster Hunter Rise
|
||||||
@@ -190,6 +202,8 @@ namespace Ryujinx.Common
|
|||||||
"01000a10041ea000", // The Elder Scrolls V: Skyrim
|
"01000a10041ea000", // The Elder Scrolls V: Skyrim
|
||||||
"010057a01e4d4000", // TSUKIHIME -A piece of blue glass moon-
|
"010057a01e4d4000", // TSUKIHIME -A piece of blue glass moon-
|
||||||
"010080b00ad66000", // Undertale
|
"010080b00ad66000", // Undertale
|
||||||
|
"010069401adb8000", // Unicorn Overlord
|
||||||
|
"0100534009ff2000", // Yonder - The cloud catcher chronicles
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,10 +26,20 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||||||
{
|
{
|
||||||
_normalSession = normalSession;
|
_normalSession = normalSession;
|
||||||
_interactiveSession = interactiveSession;
|
_interactiveSession = interactiveSession;
|
||||||
|
|
||||||
// TODO(jduncanator): Parse PlayerSelectConfig from input data
|
UserProfile selected = _system.Device.UIHandler.ShowPlayerSelectDialog();
|
||||||
_normalSession.Push(BuildResponse());
|
if (selected == null)
|
||||||
|
{
|
||||||
|
_normalSession.Push(BuildResponse());
|
||||||
|
}
|
||||||
|
else if (selected.UserId == new UserId("00000000000000000000000000000080"))
|
||||||
|
{
|
||||||
|
_normalSession.Push(BuildGuestResponse());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_normalSession.Push(BuildResponse(selected));
|
||||||
|
}
|
||||||
AppletStateChanged?.Invoke(this, null);
|
AppletStateChanged?.Invoke(this, null);
|
||||||
|
|
||||||
_system.ReturnFocus();
|
_system.ReturnFocus();
|
||||||
@@ -37,16 +47,34 @@ namespace Ryujinx.HLE.HOS.Applets
|
|||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] BuildResponse()
|
private byte[] BuildResponse(UserProfile selectedUser)
|
||||||
{
|
{
|
||||||
UserProfile currentUser = _system.AccountManager.LastOpenedUser;
|
|
||||||
|
|
||||||
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||||
using BinaryWriter writer = new(stream);
|
using BinaryWriter writer = new(stream);
|
||||||
|
|
||||||
writer.Write((ulong)PlayerSelectResult.Success);
|
writer.Write((ulong)PlayerSelectResult.Success);
|
||||||
|
|
||||||
currentUser.UserId.Write(writer);
|
selectedUser.UserId.Write(writer);
|
||||||
|
|
||||||
|
return stream.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] BuildGuestResponse()
|
||||||
|
{
|
||||||
|
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||||
|
using BinaryWriter writer = new(stream);
|
||||||
|
|
||||||
|
writer.Write(new byte());
|
||||||
|
|
||||||
|
return stream.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] BuildResponse()
|
||||||
|
{
|
||||||
|
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
|
||||||
|
using BinaryWriter writer = new(stream);
|
||||||
|
|
||||||
|
writer.Write((ulong)PlayerSelectResult.Failure);
|
||||||
|
|
||||||
return stream.ToArray();
|
return stream.ToArray();
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
@@ -48,6 +48,7 @@
|
|||||||
<EmbeddedResource Include="HOS\Applets\SoftwareKeyboard\Resources\Icon_BtnB.png" />
|
<EmbeddedResource Include="HOS\Applets\SoftwareKeyboard\Resources\Icon_BtnB.png" />
|
||||||
<EmbeddedResource Include="HOS\Applets\SoftwareKeyboard\Resources\Icon_KeyF6.png" />
|
<EmbeddedResource Include="HOS\Applets\SoftwareKeyboard\Resources\Icon_KeyF6.png" />
|
||||||
<EmbeddedResource Include="HOS\Services\Account\Acc\DefaultUserImage.jpg" />
|
<EmbeddedResource Include="HOS\Services\Account\Acc\DefaultUserImage.jpg" />
|
||||||
|
<EmbeddedResource Include="HOS\Services\Account\Acc\GuestUserImage.jpg" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Ryujinx.HLE.HOS.Applets;
|
using Ryujinx.HLE.HOS.Applets;
|
||||||
|
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||||
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
|
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.UI
|
namespace Ryujinx.HLE.UI
|
||||||
@@ -59,5 +60,11 @@ namespace Ryujinx.HLE.UI
|
|||||||
/// Gets fonts and colors used by the host.
|
/// Gets fonts and colors used by the host.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IHostUITheme HostUITheme { get; }
|
IHostUITheme HostUITheme { get; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Displays the player select dialog and returns the selected profile.
|
||||||
|
/// </summary>
|
||||||
|
UserProfile ShowPlayerSelectDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -489,7 +489,7 @@ namespace Ryujinx.Ava
|
|||||||
|
|
||||||
Dispatcher.UIThread.InvokeAsync(() =>
|
Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
{
|
{
|
||||||
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device.Processes.ActiveApplication, Program.Version);
|
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowTitleBar);
|
||||||
});
|
});
|
||||||
|
|
||||||
_viewModel.SetUiProgressHandlers(Device);
|
_viewModel.SetUiProgressHandlers(Device);
|
||||||
@@ -872,7 +872,7 @@ namespace Ryujinx.Ava
|
|||||||
Device?.System.TogglePauseEmulation(false);
|
Device?.System.TogglePauseEmulation(false);
|
||||||
|
|
||||||
_viewModel.IsPaused = false;
|
_viewModel.IsPaused = false;
|
||||||
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version);
|
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowTitleBar);
|
||||||
Logger.Info?.Print(LogClass.Emulation, "Emulation was resumed");
|
Logger.Info?.Print(LogClass.Emulation, "Emulation was resumed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -881,7 +881,7 @@ namespace Ryujinx.Ava
|
|||||||
Device?.System.TogglePauseEmulation(true);
|
Device?.System.TogglePauseEmulation(true);
|
||||||
|
|
||||||
_viewModel.IsPaused = true;
|
_viewModel.IsPaused = true;
|
||||||
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, LocaleManager.Instance[LocaleKeys.Paused]);
|
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowTitleBar, LocaleManager.Instance[LocaleKeys.Paused]);
|
||||||
Logger.Info?.Print(LogClass.Emulation, "Emulation was paused");
|
Logger.Info?.Print(LogClass.Emulation, "Emulation was paused");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -897,7 +897,7 @@ namespace Ryujinx.Ava
|
|||||||
{
|
{
|
||||||
#pragma warning disable CA1416 // This call site is reachable on all platforms
|
#pragma warning disable CA1416 // This call site is reachable on all platforms
|
||||||
// SelectGraphicsBackend does a check for Mac, on top of checking if it's an ARM Mac. This isn't a problem.
|
// SelectGraphicsBackend does a check for Mac, on top of checking if it's an ARM Mac. This isn't a problem.
|
||||||
GraphicsBackend.Metal => new MetalRenderer(() => new SharpMetal.QuartzCore.CAMetalLayer(((EmbeddedWindowMetal)RendererHost.EmbeddedWindow).MetalLayer)),
|
GraphicsBackend.Metal => new MetalRenderer((RendererHost.EmbeddedWindow as EmbeddedWindowMetal)!.CreateSurface),
|
||||||
#pragma warning restore CA1416
|
#pragma warning restore CA1416
|
||||||
GraphicsBackend.Vulkan => VulkanRenderer.Create(
|
GraphicsBackend.Vulkan => VulkanRenderer.Create(
|
||||||
ConfigurationState.Instance.Graphics.PreferredGpu,
|
ConfigurationState.Instance.Graphics.PreferredGpu,
|
||||||
@@ -1040,7 +1040,7 @@ namespace Ryujinx.Ava
|
|||||||
_viewModel.WindowState = WindowState.FullScreen;
|
_viewModel.WindowState = WindowState.FullScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_viewModel.WindowState is WindowState.FullScreen)
|
if (_viewModel.WindowState is WindowState.FullScreen || _viewModel.StartGamesWithoutUI)
|
||||||
{
|
{
|
||||||
_viewModel.ShowMenuAndStatusBar = false;
|
_viewModel.ShowMenuAndStatusBar = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -572,6 +572,31 @@
|
|||||||
"zh_TW": "使用全螢幕模式啟動遊戲"
|
"zh_TW": "使用全螢幕模式啟動遊戲"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ID": "MenuBarOptionsStartGamesWithoutUI",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "",
|
||||||
|
"de_DE": "",
|
||||||
|
"el_GR": "",
|
||||||
|
"en_US": "Start Games with UI Hidden",
|
||||||
|
"es_ES": "",
|
||||||
|
"fr_FR": "",
|
||||||
|
"he_IL": "",
|
||||||
|
"it_IT": "",
|
||||||
|
"ja_JP": "",
|
||||||
|
"ko_KR": "",
|
||||||
|
"no_NO": "",
|
||||||
|
"pl_PL": "",
|
||||||
|
"pt_BR": "",
|
||||||
|
"ru_RU": "",
|
||||||
|
"sv_SE": "",
|
||||||
|
"th_TH": "",
|
||||||
|
"tr_TR": "",
|
||||||
|
"uk_UA": "",
|
||||||
|
"zh_CN": "",
|
||||||
|
"zh_TW": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ID": "MenuBarOptionsStopEmulation",
|
"ID": "MenuBarOptionsStopEmulation",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
@@ -22660,7 +22685,7 @@
|
|||||||
"it_IT": "",
|
"it_IT": "",
|
||||||
"ja_JP": "",
|
"ja_JP": "",
|
||||||
"ko_KR": "",
|
"ko_KR": "",
|
||||||
"no_NO": "",
|
"no_NO": "Sist oppdatert: {0}",
|
||||||
"pl_PL": "",
|
"pl_PL": "",
|
||||||
"pt_BR": "",
|
"pt_BR": "",
|
||||||
"ru_RU": "",
|
"ru_RU": "",
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ namespace Ryujinx.Ava.Common
|
|||||||
{
|
{
|
||||||
public static class ThemeManager
|
public static class ThemeManager
|
||||||
{
|
{
|
||||||
public static event EventHandler ThemeChanged;
|
public static event Action ThemeChanged;
|
||||||
|
|
||||||
public static void OnThemeChanged()
|
public static void OnThemeChanged()
|
||||||
{
|
{
|
||||||
ThemeChanged?.Invoke(null, EventArgs.Empty);
|
ThemeChanged?.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using DiscordRPC;
|
|||||||
using Gommon;
|
using Gommon;
|
||||||
using Humanizer;
|
using Humanizer;
|
||||||
using Humanizer.Localisation;
|
using Humanizer.Localisation;
|
||||||
|
using Ryujinx.Ava.Utilities;
|
||||||
using Ryujinx.Ava.Utilities.AppLibrary;
|
using Ryujinx.Ava.Utilities.AppLibrary;
|
||||||
using Ryujinx.Ava.Utilities.Configuration;
|
using Ryujinx.Ava.Utilities.Configuration;
|
||||||
using Ryujinx.Common;
|
using Ryujinx.Common;
|
||||||
@@ -97,7 +98,7 @@ namespace Ryujinx.Ava
|
|||||||
},
|
},
|
||||||
Details = TruncateToByteLength($"Playing {appMeta.Title}"),
|
Details = TruncateToByteLength($"Playing {appMeta.Title}"),
|
||||||
State = appMeta.LastPlayed.HasValue && appMeta.TimePlayed.TotalSeconds > 5
|
State = appMeta.LastPlayed.HasValue && appMeta.TimePlayed.TotalSeconds > 5
|
||||||
? $"Total play time: {appMeta.TimePlayed.Humanize(2, false, maxUnit: TimeUnit.Hour)}"
|
? $"Total play time: {ValueFormatUtils.FormatTimeSpan(appMeta.TimePlayed)}"
|
||||||
: "Never played",
|
: "Never played",
|
||||||
Timestamps = Timestamps.Now
|
Timestamps = Timestamps.Now
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ using Ryujinx.Common.Logging;
|
|||||||
using Ryujinx.Common.Utilities;
|
using Ryujinx.Common.Utilities;
|
||||||
using Ryujinx.Graphics.GAL;
|
using Ryujinx.Graphics.GAL;
|
||||||
using Ryujinx.Graphics.GAL.Multithreading;
|
using Ryujinx.Graphics.GAL.Multithreading;
|
||||||
|
using Ryujinx.Graphics.Metal;
|
||||||
|
using Ryujinx.Graphics.OpenGL;
|
||||||
using Ryujinx.Graphics.Vulkan;
|
using Ryujinx.Graphics.Vulkan;
|
||||||
using Ryujinx.HLE;
|
using Ryujinx.HLE;
|
||||||
using Ryujinx.Input;
|
using Ryujinx.Input;
|
||||||
@@ -310,10 +312,10 @@ namespace Ryujinx.Headless
|
|||||||
|
|
||||||
if (options.GraphicsBackend == GraphicsBackend.Metal && window is MetalWindow metalWindow && OperatingSystem.IsMacOS())
|
if (options.GraphicsBackend == GraphicsBackend.Metal && window is MetalWindow metalWindow && OperatingSystem.IsMacOS())
|
||||||
{
|
{
|
||||||
return new Graphics.Metal.MetalRenderer(metalWindow.GetLayer);
|
return new MetalRenderer(metalWindow.GetLayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Graphics.OpenGL.OpenGLRenderer();
|
return new OpenGLRenderer();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Switch InitializeEmulationContext(WindowBase window, IRenderer renderer, Options options)
|
private static Switch InitializeEmulationContext(WindowBase window, IRenderer renderer, Options options)
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Ryujinx.Headless
|
|
||||||
{
|
|
||||||
class StatusUpdatedEventArgs(
|
|
||||||
string vSyncMode,
|
|
||||||
string dockedMode,
|
|
||||||
string aspectRatio,
|
|
||||||
string gameStatus,
|
|
||||||
string fifoStatus,
|
|
||||||
string gpuName)
|
|
||||||
: EventArgs
|
|
||||||
{
|
|
||||||
public string VSyncMode = vSyncMode;
|
|
||||||
public string DockedMode = dockedMode;
|
|
||||||
public string AspectRatio = aspectRatio;
|
|
||||||
public string GameStatus = gameStatus;
|
|
||||||
public string FifoStatus = fifoStatus;
|
|
||||||
public string GpuName = gpuName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -108,8 +108,7 @@ namespace Ryujinx.Headless
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly GraphicsDebugLevel _glLogLevel;
|
|
||||||
private SDL2OpenGLContext _openGLContext;
|
private SDL2OpenGLContext _openGLContext;
|
||||||
|
|
||||||
public OpenGLWindow(
|
public OpenGLWindow(
|
||||||
@@ -121,7 +120,6 @@ namespace Ryujinx.Headless
|
|||||||
bool ignoreControllerApplet)
|
bool ignoreControllerApplet)
|
||||||
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode, ignoreControllerApplet)
|
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode, ignoreControllerApplet)
|
||||||
{
|
{
|
||||||
_glLogLevel = glLogLevel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SDL_WindowFlags WindowFlags => SDL_WindowFlags.SDL_WINDOW_OPENGL;
|
public override SDL_WindowFlags WindowFlags => SDL_WindowFlags.SDL_WINDOW_OPENGL;
|
||||||
@@ -129,7 +127,7 @@ namespace Ryujinx.Headless
|
|||||||
protected override void InitializeWindowRenderer()
|
protected override void InitializeWindowRenderer()
|
||||||
{
|
{
|
||||||
// Ensure to not share this context with other contexts before this point.
|
// Ensure to not share this context with other contexts before this point.
|
||||||
SetupOpenGLAttributes(false, _glLogLevel);
|
SetupOpenGLAttributes(false, GlLogLevel);
|
||||||
nint context = SDL_GL_CreateContext(WindowHandle);
|
nint context = SDL_GL_CreateContext(WindowHandle);
|
||||||
CheckResult(SDL_GL_SetSwapInterval(1));
|
CheckResult(SDL_GL_SetSwapInterval(1));
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ namespace Ryujinx.Headless
|
|||||||
{
|
{
|
||||||
class VulkanWindow : WindowBase
|
class VulkanWindow : WindowBase
|
||||||
{
|
{
|
||||||
private readonly GraphicsDebugLevel _glLogLevel;
|
|
||||||
|
|
||||||
public VulkanWindow(
|
public VulkanWindow(
|
||||||
InputManager inputManager,
|
InputManager inputManager,
|
||||||
GraphicsDebugLevel glLogLevel,
|
GraphicsDebugLevel glLogLevel,
|
||||||
@@ -21,7 +19,6 @@ namespace Ryujinx.Headless
|
|||||||
bool ignoreControllerApplet)
|
bool ignoreControllerApplet)
|
||||||
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode, ignoreControllerApplet)
|
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode, ignoreControllerApplet)
|
||||||
{
|
{
|
||||||
_glLogLevel = glLogLevel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override SDL_WindowFlags WindowFlags => SDL_WindowFlags.SDL_WINDOW_VULKAN;
|
public override SDL_WindowFlags WindowFlags => SDL_WindowFlags.SDL_WINDOW_VULKAN;
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
using Humanizer;
|
using Humanizer;
|
||||||
using LibHac.Tools.Fs;
|
|
||||||
using Ryujinx.Ava;
|
using Ryujinx.Ava;
|
||||||
|
using Ryujinx.Ava.UI.Models;
|
||||||
using Ryujinx.Common;
|
using Ryujinx.Common;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Configuration.Hid;
|
using Ryujinx.Common.Configuration.Hid;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Graphics.GAL;
|
using Ryujinx.Graphics.GAL;
|
||||||
using Ryujinx.Graphics.GAL.Multithreading;
|
using Ryujinx.Graphics.GAL.Multithreading;
|
||||||
using Ryujinx.Graphics.Gpu;
|
|
||||||
using Ryujinx.Graphics.OpenGL;
|
using Ryujinx.Graphics.OpenGL;
|
||||||
using Ryujinx.HLE.HOS.Applets;
|
using Ryujinx.HLE.HOS.Applets;
|
||||||
|
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||||
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
|
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
|
||||||
using Ryujinx.HLE.UI;
|
using Ryujinx.HLE.UI;
|
||||||
using Ryujinx.Input;
|
using Ryujinx.Input;
|
||||||
@@ -27,6 +27,7 @@ using static SDL2.SDL;
|
|||||||
using AntiAliasing = Ryujinx.Common.Configuration.AntiAliasing;
|
using AntiAliasing = Ryujinx.Common.Configuration.AntiAliasing;
|
||||||
using ScalingFilter = Ryujinx.Common.Configuration.ScalingFilter;
|
using ScalingFilter = Ryujinx.Common.Configuration.ScalingFilter;
|
||||||
using Switch = Ryujinx.HLE.Switch;
|
using Switch = Ryujinx.HLE.Switch;
|
||||||
|
using UserProfile = Ryujinx.HLE.HOS.Services.Account.Acc.UserProfile;
|
||||||
|
|
||||||
namespace Ryujinx.Headless
|
namespace Ryujinx.Headless
|
||||||
{
|
{
|
||||||
@@ -54,8 +55,6 @@ namespace Ryujinx.Headless
|
|||||||
public Switch Device { get; private set; }
|
public Switch Device { get; private set; }
|
||||||
public IRenderer Renderer { get; private set; }
|
public IRenderer Renderer { get; private set; }
|
||||||
|
|
||||||
public event EventHandler<StatusUpdatedEventArgs> StatusUpdatedEvent;
|
|
||||||
|
|
||||||
protected nint WindowHandle { get; set; }
|
protected nint WindowHandle { get; set; }
|
||||||
|
|
||||||
public IHostUITheme HostUITheme { get; }
|
public IHostUITheme HostUITheme { get; }
|
||||||
@@ -73,7 +72,7 @@ namespace Ryujinx.Headless
|
|||||||
protected SDL2MouseDriver MouseDriver;
|
protected SDL2MouseDriver MouseDriver;
|
||||||
private readonly InputManager _inputManager;
|
private readonly InputManager _inputManager;
|
||||||
private readonly IKeyboard _keyboardInterface;
|
private readonly IKeyboard _keyboardInterface;
|
||||||
private readonly GraphicsDebugLevel _glLogLevel;
|
protected readonly GraphicsDebugLevel GlLogLevel;
|
||||||
private readonly Stopwatch _chrono;
|
private readonly Stopwatch _chrono;
|
||||||
private readonly long _ticksPerFrame;
|
private readonly long _ticksPerFrame;
|
||||||
private readonly CancellationTokenSource _gpuCancellationTokenSource;
|
private readonly CancellationTokenSource _gpuCancellationTokenSource;
|
||||||
@@ -105,7 +104,7 @@ namespace Ryujinx.Headless
|
|||||||
NpadManager = _inputManager.CreateNpadManager();
|
NpadManager = _inputManager.CreateNpadManager();
|
||||||
TouchScreenManager = _inputManager.CreateTouchScreenManager();
|
TouchScreenManager = _inputManager.CreateTouchScreenManager();
|
||||||
_keyboardInterface = (IKeyboard)_inputManager.KeyboardDriver.GetGamepad("0");
|
_keyboardInterface = (IKeyboard)_inputManager.KeyboardDriver.GetGamepad("0");
|
||||||
_glLogLevel = glLogLevel;
|
GlLogLevel = glLogLevel;
|
||||||
_chrono = new Stopwatch();
|
_chrono = new Stopwatch();
|
||||||
_ticksPerFrame = Stopwatch.Frequency / TargetFps;
|
_ticksPerFrame = Stopwatch.Frequency / TargetFps;
|
||||||
_gpuCancellationTokenSource = new CancellationTokenSource();
|
_gpuCancellationTokenSource = new CancellationTokenSource();
|
||||||
@@ -269,7 +268,7 @@ namespace Ryujinx.Headless
|
|||||||
{
|
{
|
||||||
InitializeWindowRenderer();
|
InitializeWindowRenderer();
|
||||||
|
|
||||||
Device.Gpu.Renderer.Initialize(_glLogLevel);
|
Device.Gpu.Renderer.Initialize(GlLogLevel);
|
||||||
|
|
||||||
InitializeRenderer();
|
InitializeRenderer();
|
||||||
|
|
||||||
@@ -309,21 +308,6 @@ namespace Ryujinx.Headless
|
|||||||
|
|
||||||
if (_ticks >= _ticksPerFrame)
|
if (_ticks >= _ticksPerFrame)
|
||||||
{
|
{
|
||||||
string dockedMode = Device.System.State.DockedMode ? "Docked" : "Handheld";
|
|
||||||
float scale = GraphicsConfig.ResScale;
|
|
||||||
if (scale != 1)
|
|
||||||
{
|
|
||||||
dockedMode += $" ({scale}x)";
|
|
||||||
}
|
|
||||||
|
|
||||||
StatusUpdatedEvent?.Invoke(this, new StatusUpdatedEventArgs(
|
|
||||||
Device.VSyncMode.ToString(),
|
|
||||||
dockedMode,
|
|
||||||
Device.Configuration.AspectRatio.ToText(),
|
|
||||||
$"{Device.Statistics.GetGameFrameRate():00.00} FPS ({Device.Statistics.GetGameFrameTime():00.00} ms)",
|
|
||||||
$"FIFO: {Device.Statistics.GetFifoPercent():0.00} %",
|
|
||||||
$"GPU: {_gpuDriverName}"));
|
|
||||||
|
|
||||||
_ticks = Math.Min(_ticks - _ticksPerFrame, _ticksPerFrame);
|
_ticks = Math.Min(_ticks - _ticksPerFrame, _ticksPerFrame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -573,5 +557,10 @@ namespace Ryujinx.Headless
|
|||||||
SDL2Driver.Instance.Dispose();
|
SDL2Driver.Instance.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UserProfile ShowPlayerSelectDialog()
|
||||||
|
{
|
||||||
|
return AccountSaveDataManager.GetLastUsedUser();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<ProjectReference Include="..\Ryujinx.Audio.Backends.SDL2\Ryujinx.Audio.Backends.SDL2.csproj" />
|
<ProjectReference Include="..\Ryujinx.Audio.Backends.SDL2\Ryujinx.Audio.Backends.SDL2.csproj" />
|
||||||
<ProjectReference Include="..\Ryujinx.Graphics.Vulkan\Ryujinx.Graphics.Vulkan.csproj" />
|
<ProjectReference Include="..\Ryujinx.Graphics.Vulkan\Ryujinx.Graphics.Vulkan.csproj" />
|
||||||
<ProjectReference Include="..\Ryujinx.Graphics.OpenGL\Ryujinx.Graphics.OpenGL.csproj" />
|
<ProjectReference Include="..\Ryujinx.Graphics.OpenGL\Ryujinx.Graphics.OpenGL.csproj" />
|
||||||
<ProjectReference Include="..\Ryujinx.Graphics.Metal\Ryujinx.Graphics.Metal.csproj" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'linux-arm64' AND '$(RuntimeIdentifier)' != 'win-x64'" />
|
<ProjectReference Include="..\Ryujinx.Graphics.Metal\Ryujinx.Graphics.Metal.csproj" />
|
||||||
<ProjectReference Include="..\Ryujinx.Input\Ryujinx.Input.csproj" />
|
<ProjectReference Include="..\Ryujinx.Input\Ryujinx.Input.csproj" />
|
||||||
<ProjectReference Include="..\Ryujinx.Input.SDL2\Ryujinx.Input.SDL2.csproj" />
|
<ProjectReference Include="..\Ryujinx.Input.SDL2\Ryujinx.Input.SDL2.csproj" />
|
||||||
<ProjectReference Include="..\Ryujinx.Audio.Backends.OpenAL\Ryujinx.Audio.Backends.OpenAL.csproj" />
|
<ProjectReference Include="..\Ryujinx.Audio.Backends.OpenAL\Ryujinx.Audio.Backends.OpenAL.csproj" />
|
||||||
@@ -173,4 +173,10 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Assets\Fonts\Mono\" />
|
<Folder Include="Assets\Fonts\Mono\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="UI\Applet\UserSelectorDialog.axaml.cs">
|
||||||
|
<DependentUpon>UserSelectorDialog.axaml</DependentUpon>
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,17 +1,24 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
using FluentAvalonia.UI.Controls;
|
using FluentAvalonia.UI.Controls;
|
||||||
|
using Gommon;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.Controls;
|
using Ryujinx.Ava.UI.Controls;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
|
using Ryujinx.Ava.UI.ViewModels.Input;
|
||||||
using Ryujinx.Ava.UI.Windows;
|
using Ryujinx.Ava.UI.Windows;
|
||||||
using Ryujinx.Ava.Utilities.Configuration;
|
using Ryujinx.Ava.Utilities.Configuration;
|
||||||
|
using Ryujinx.Common;
|
||||||
using Ryujinx.HLE;
|
using Ryujinx.HLE;
|
||||||
using Ryujinx.HLE.HOS.Applets;
|
using Ryujinx.HLE.HOS.Applets;
|
||||||
using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard;
|
using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard;
|
||||||
|
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||||
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
|
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
|
||||||
using Ryujinx.HLE.UI;
|
using Ryujinx.HLE.UI;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Applet
|
namespace Ryujinx.Ava.UI.Applet
|
||||||
@@ -253,5 +260,59 @@ namespace Ryujinx.Ava.UI.Applet
|
|||||||
}
|
}
|
||||||
|
|
||||||
public IDynamicTextInputHandler CreateDynamicTextInputHandler() => new AvaloniaDynamicTextInputHandler(_parent);
|
public IDynamicTextInputHandler CreateDynamicTextInputHandler() => new AvaloniaDynamicTextInputHandler(_parent);
|
||||||
|
|
||||||
|
public UserProfile ShowPlayerSelectDialog()
|
||||||
|
{
|
||||||
|
UserId selected = UserId.Null;
|
||||||
|
byte[] defaultGuestImage = EmbeddedResources.Read("Ryujinx.HLE/HOS/Services/Account/Acc/GuestUserImage.jpg");
|
||||||
|
UserProfile guest = new UserProfile(new UserId("00000000000000000000000000000080"), "Guest", defaultGuestImage);
|
||||||
|
|
||||||
|
ManualResetEvent dialogCloseEvent = new(false);
|
||||||
|
|
||||||
|
Dispatcher.UIThread.InvokeAsync(async () =>
|
||||||
|
{
|
||||||
|
ObservableCollection<BaseModel> profiles = [];
|
||||||
|
NavigationDialogHost nav = new();
|
||||||
|
|
||||||
|
_parent.AccountManager.GetAllUsers()
|
||||||
|
.OrderBy(x => x.Name)
|
||||||
|
.ForEach(profile => profiles.Add(new Models.UserProfile(profile, nav)));
|
||||||
|
|
||||||
|
profiles.Add(new Models.UserProfile(guest, nav));
|
||||||
|
UserSelectorDialogViewModel viewModel = new()
|
||||||
|
{
|
||||||
|
Profiles = profiles,
|
||||||
|
SelectedUserId = _parent.AccountManager.LastOpenedUser.UserId
|
||||||
|
};
|
||||||
|
UserSelectorDialog content = new(viewModel);
|
||||||
|
(selected, _) = await UserSelectorDialog.ShowInputDialog(content);
|
||||||
|
|
||||||
|
dialogCloseEvent.Set();
|
||||||
|
});
|
||||||
|
|
||||||
|
dialogCloseEvent.WaitOne();
|
||||||
|
|
||||||
|
UserProfile profile = _parent.AccountManager.LastOpenedUser;
|
||||||
|
if (selected == guest.UserId)
|
||||||
|
{
|
||||||
|
profile = guest;
|
||||||
|
}
|
||||||
|
else if (selected == UserId.Null)
|
||||||
|
{
|
||||||
|
profile = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (UserProfile p in _parent.AccountManager.GetAllUsers())
|
||||||
|
{
|
||||||
|
if (p.UserId == selected)
|
||||||
|
{
|
||||||
|
profile = p;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return profile;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="Ryujinx.Ava.UI.Applet.UserSelectorDialog"
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
||||||
|
xmlns:models="clr-namespace:Ryujinx.Ava.UI.Models"
|
||||||
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
MinWidth="500"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Focusable="True"
|
||||||
|
x:DataType="viewModels:UserSelectorDialogViewModel">
|
||||||
|
|
||||||
|
<UserControl.Resources>
|
||||||
|
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
||||||
|
</UserControl.Resources>
|
||||||
|
|
||||||
|
<Design.DataContext>
|
||||||
|
<viewModels:UserSelectorDialogViewModel />
|
||||||
|
</Design.DataContext>
|
||||||
|
|
||||||
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Border
|
||||||
|
CornerRadius="5"
|
||||||
|
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
|
||||||
|
BorderThickness="1">
|
||||||
|
|
||||||
|
<ListBox
|
||||||
|
MaxHeight="300"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="Transparent"
|
||||||
|
ItemsSource="{Binding Profiles}"
|
||||||
|
SelectionChanged="ProfilesList_SelectionChanged">
|
||||||
|
|
||||||
|
<ListBox.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<WrapPanel
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Orientation="Horizontal" />
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ListBox.ItemsPanel>
|
||||||
|
|
||||||
|
<ListBox.Styles>
|
||||||
|
<Style Selector="ListBoxItem">
|
||||||
|
<Setter Property="Margin" Value="5 5 0 5" />
|
||||||
|
<Setter Property="CornerRadius" Value="5" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Rectangle#SelectionIndicator">
|
||||||
|
<Setter Property="Opacity" Value="0" />
|
||||||
|
</Style>
|
||||||
|
</ListBox.Styles>
|
||||||
|
|
||||||
|
<ListBox.DataTemplates>
|
||||||
|
<DataTemplate
|
||||||
|
DataType="models:UserProfile">
|
||||||
|
<Grid
|
||||||
|
PointerEntered="Grid_PointerEntered"
|
||||||
|
PointerExited="Grid_OnPointerExited">
|
||||||
|
<Border
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
ClipToBounds="True"
|
||||||
|
CornerRadius="5"
|
||||||
|
Background="{Binding BackgroundColor}">
|
||||||
|
<StackPanel
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Stretch">
|
||||||
|
<Image
|
||||||
|
Width="96"
|
||||||
|
Height="96"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Source="{Binding Image, Converter={StaticResource ByteImage}}" />
|
||||||
|
<TextBlock
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
MaxWidth="90"
|
||||||
|
Text="{Binding Name}"
|
||||||
|
TextAlignment="Center"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
MaxLines="2"
|
||||||
|
Margin="5" />
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate
|
||||||
|
DataType="viewModels:BaseModel">
|
||||||
|
<Panel
|
||||||
|
Height="118"
|
||||||
|
Width="96">
|
||||||
|
<Panel.Styles>
|
||||||
|
<Style Selector="Panel">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource ListBoxBackground}" />
|
||||||
|
</Style>
|
||||||
|
</Panel.Styles>
|
||||||
|
</Panel>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.DataTemplates>
|
||||||
|
</ListBox>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<StackPanel
|
||||||
|
Grid.Row="1"
|
||||||
|
Margin="0 24 0 0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="10">
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Input;
|
||||||
|
using FluentAvalonia.UI.Controls;
|
||||||
|
using Ryujinx.Ava.Common.Locale;
|
||||||
|
using Ryujinx.Ava.UI.Controls;
|
||||||
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
|
using Ryujinx.Ava.UI.ViewModels.Input;
|
||||||
|
using Ryujinx.Common.Logging;
|
||||||
|
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using UserProfile = Ryujinx.Ava.UI.Models.UserProfile;
|
||||||
|
using UserProfileSft = Ryujinx.HLE.HOS.Services.Account.Acc.UserProfile;
|
||||||
|
|
||||||
|
namespace Ryujinx.Ava.UI.Applet
|
||||||
|
{
|
||||||
|
public partial class UserSelectorDialog : UserControl, INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public UserSelectorDialogViewModel ViewModel { get; set; }
|
||||||
|
|
||||||
|
public UserSelectorDialog(UserSelectorDialogViewModel viewModel)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
ViewModel = viewModel;
|
||||||
|
DataContext = ViewModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Grid_PointerEntered(object sender, PointerEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is Grid { DataContext: UserProfile profile })
|
||||||
|
{
|
||||||
|
profile.IsPointerOver = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Grid_OnPointerExited(object sender, PointerEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is Grid { DataContext: UserProfile profile })
|
||||||
|
{
|
||||||
|
profile.IsPointerOver = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ProfilesList_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is ListBox listBox)
|
||||||
|
{
|
||||||
|
int selectedIndex = listBox.SelectedIndex;
|
||||||
|
|
||||||
|
if (selectedIndex >= 0 && selectedIndex < ViewModel.Profiles.Count)
|
||||||
|
{
|
||||||
|
if (ViewModel.Profiles[selectedIndex] is UserProfile userProfile)
|
||||||
|
{
|
||||||
|
ViewModel.SelectedUserId = userProfile.UserId;
|
||||||
|
Logger.Info?.Print(LogClass.UI, $"Selected user: {userProfile.UserId}");
|
||||||
|
|
||||||
|
ObservableCollection<BaseModel> newProfiles = [];
|
||||||
|
|
||||||
|
foreach (var item in ViewModel.Profiles)
|
||||||
|
{
|
||||||
|
if (item is UserProfile originalItem)
|
||||||
|
{
|
||||||
|
var profile = new UserProfileSft(originalItem.UserId, originalItem.Name, originalItem.Image);
|
||||||
|
|
||||||
|
if (profile.UserId == ViewModel.SelectedUserId)
|
||||||
|
{
|
||||||
|
profile.AccountState = AccountState.Open;
|
||||||
|
}
|
||||||
|
|
||||||
|
newProfiles.Add(new UserProfile(profile, new NavigationDialogHost()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewModel.Profiles = newProfiles;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<(UserId Id, bool Result)> ShowInputDialog(UserSelectorDialog content)
|
||||||
|
{
|
||||||
|
ContentDialog contentDialog = new()
|
||||||
|
{
|
||||||
|
Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle],
|
||||||
|
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.Continue],
|
||||||
|
SecondaryButtonText = string.Empty,
|
||||||
|
CloseButtonText = LocaleManager.Instance[LocaleKeys.Cancel],
|
||||||
|
Content = content,
|
||||||
|
Padding = new Thickness(0)
|
||||||
|
};
|
||||||
|
|
||||||
|
UserId result = UserId.Null;
|
||||||
|
bool input = false;
|
||||||
|
|
||||||
|
void Handler(ContentDialog sender, ContentDialogClosedEventArgs eventArgs)
|
||||||
|
{
|
||||||
|
if (eventArgs.Result == ContentDialogResult.Primary)
|
||||||
|
{
|
||||||
|
if (contentDialog.Content is UserSelectorDialog view)
|
||||||
|
{
|
||||||
|
result = view.ViewModel.SelectedUserId;
|
||||||
|
input = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = UserId.Null;
|
||||||
|
input = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contentDialog.Closed += Handler;
|
||||||
|
|
||||||
|
await ContentDialogHelper.ShowAsync(contentDialog);
|
||||||
|
|
||||||
|
return (result, input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Ryujinx.Ava.UI.Helpers
|
||||||
|
{
|
||||||
|
#nullable enable
|
||||||
|
public static class Commands
|
||||||
|
{
|
||||||
|
public static RelayCommand Create(Action action)
|
||||||
|
=> new(action);
|
||||||
|
public static RelayCommand CreateConditional(Action action, Func<bool> canExecute)
|
||||||
|
=> new(action, canExecute);
|
||||||
|
|
||||||
|
public static RelayCommand<T> CreateWithArg<T>(Action<T?> action)
|
||||||
|
=> new(action);
|
||||||
|
public static RelayCommand<T> CreateConditionalWithArg<T>(Action<T?> action, Predicate<T?> canExecute)
|
||||||
|
=> new(action, canExecute);
|
||||||
|
|
||||||
|
public static AsyncRelayCommand Create(Func<Task> action)
|
||||||
|
=> new(action, AsyncRelayCommandOptions.None);
|
||||||
|
public static AsyncRelayCommand CreateConcurrent(Func<Task> action)
|
||||||
|
=> new(action, AsyncRelayCommandOptions.AllowConcurrentExecutions);
|
||||||
|
public static AsyncRelayCommand CreateSilentFail(Func<Task> action)
|
||||||
|
=> new(action, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
|
||||||
|
|
||||||
|
public static AsyncRelayCommand<T> CreateWithArg<T>(Func<T?, Task> action)
|
||||||
|
=> new(action, AsyncRelayCommandOptions.None);
|
||||||
|
public static AsyncRelayCommand<T> CreateConcurrentWithArg<T>(Func<T?, Task> action)
|
||||||
|
=> new(action, AsyncRelayCommandOptions.AllowConcurrentExecutions);
|
||||||
|
public static AsyncRelayCommand<T> CreateSilentFailWithArg<T>(Func<T?, Task> action)
|
||||||
|
=> new(action, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
|
||||||
|
|
||||||
|
public static AsyncRelayCommand CreateConditional(Func<Task> action, Func<bool> canExecute)
|
||||||
|
=> new(action, canExecute, AsyncRelayCommandOptions.None);
|
||||||
|
public static AsyncRelayCommand CreateConcurrentConditional(Func<Task> action, Func<bool> canExecute)
|
||||||
|
=> new(action, canExecute, AsyncRelayCommandOptions.AllowConcurrentExecutions);
|
||||||
|
public static AsyncRelayCommand CreateSilentFailConditional(Func<Task> action, Func<bool> canExecute)
|
||||||
|
=> new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
|
||||||
|
|
||||||
|
public static AsyncRelayCommand<T> CreateConditionalWithArg<T>(Func<T?, Task> action, Predicate<T?> canExecute)
|
||||||
|
=> new(action, canExecute, AsyncRelayCommandOptions.None);
|
||||||
|
public static AsyncRelayCommand<T> CreateConcurrentConditionalWithArg<T>(Func<T?, Task> action, Predicate<T?> canExecute)
|
||||||
|
=> new(action, canExecute, AsyncRelayCommandOptions.AllowConcurrentExecutions);
|
||||||
|
public static AsyncRelayCommand<T> CreateSilentFailConditionalWithArg<T>(Func<T?, Task> action, Predicate<T?> canExecute)
|
||||||
|
=> new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,5 +22,22 @@ namespace Ryujinx.Ava.UI.Models
|
|||||||
FifoStatus = fifoStatus;
|
FifoStatus = fifoStatus;
|
||||||
ShaderCount = shaderCount;
|
ShaderCount = shaderCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
if (obj is not StatusUpdatedEventArgs suea) return false;
|
||||||
|
return
|
||||||
|
VSyncMode == suea.VSyncMode &&
|
||||||
|
VolumeStatus == suea.VolumeStatus &&
|
||||||
|
DockedMode == suea.DockedMode &&
|
||||||
|
AspectRatio == suea.AspectRatio &&
|
||||||
|
GameStatus == suea.GameStatus &&
|
||||||
|
FifoStatus == suea.FifoStatus &&
|
||||||
|
ShaderCount == suea.ShaderCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
=> HashCode.Combine(VSyncMode, VolumeStatus, AspectRatio, DockedMode, FifoStatus, GameStatus, ShaderCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Input;
|
||||||
using Avalonia.Platform;
|
using Avalonia.Platform;
|
||||||
using Ryujinx.Ava.Utilities.Configuration;
|
using Ryujinx.Ava.Utilities.Configuration;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
@@ -27,7 +28,7 @@ namespace Ryujinx.Ava.UI.Renderer
|
|||||||
protected nint WindowHandle { get; set; }
|
protected nint WindowHandle { get; set; }
|
||||||
protected nint X11Display { get; set; }
|
protected nint X11Display { get; set; }
|
||||||
protected nint NsView { get; set; }
|
protected nint NsView { get; set; }
|
||||||
public nint MetalLayer { get; protected set; }
|
protected nint MetalLayer { get; set; }
|
||||||
|
|
||||||
public delegate void UpdateBoundsCallbackDelegate(Rect rect);
|
public delegate void UpdateBoundsCallbackDelegate(Rect rect);
|
||||||
private UpdateBoundsCallbackDelegate _updateBoundsCallback;
|
private UpdateBoundsCallbackDelegate _updateBoundsCallback;
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
using SharpMetal.QuartzCore;
|
using SharpMetal.QuartzCore;
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.Versioning;
|
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Renderer
|
namespace Ryujinx.Ava.UI.Renderer
|
||||||
{
|
{
|
||||||
[SupportedOSPlatform("macos")]
|
|
||||||
public class EmbeddedWindowMetal : EmbeddedWindow
|
public class EmbeddedWindowMetal : EmbeddedWindow
|
||||||
{
|
{
|
||||||
public CAMetalLayer CreateSurface()
|
public CAMetalLayer CreateSurface()
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
ThemeManager.ThemeChanged += ThemeManager_ThemeChanged;
|
ThemeManager.ThemeChanged += ThemeManager_ThemeChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ThemeManager_ThemeChanged(object sender, EventArgs e)
|
private void ThemeManager_ThemeChanged()
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Post(() => UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value));
|
Dispatcher.UIThread.Post(() => UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -489,6 +489,19 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool StartGamesWithoutUI
|
||||||
|
{
|
||||||
|
get => ConfigurationState.Instance.UI.StartNoUI;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ConfigurationState.Instance.UI.StartNoUI.Value = value;
|
||||||
|
|
||||||
|
ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath);
|
||||||
|
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool ShowConsole
|
public bool ShowConsole
|
||||||
{
|
{
|
||||||
get => ConfigurationState.Instance.UI.ShowConsole;
|
get => ConfigurationState.Instance.UI.ShowConsole;
|
||||||
@@ -1196,6 +1209,11 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
StartGamesInFullscreen = !StartGamesInFullscreen;
|
StartGamesInFullscreen = !StartGamesInFullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ToggleStartGamesWithoutUI()
|
||||||
|
{
|
||||||
|
StartGamesWithoutUI = !StartGamesWithoutUI;
|
||||||
|
}
|
||||||
|
|
||||||
public void ToggleShowConsole()
|
public void ToggleShowConsole()
|
||||||
{
|
{
|
||||||
ShowConsole = !ShowConsole;
|
ShowConsole = !ShowConsole;
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
|
namespace Ryujinx.Ava.UI.ViewModels
|
||||||
|
{
|
||||||
|
public partial class UserSelectorDialogViewModel : BaseModel
|
||||||
|
{
|
||||||
|
|
||||||
|
[ObservableProperty] private UserId _selectedUserId;
|
||||||
|
|
||||||
|
[ObservableProperty] private ObservableCollection<BaseModel> _profiles = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -119,6 +119,29 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</MenuItem.Styles>
|
</MenuItem.Styles>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem
|
||||||
|
Padding="0"
|
||||||
|
Command="{Binding ToggleStartGamesWithoutUI}"
|
||||||
|
Header="{ext:Locale MenuBarOptionsStartGamesWithoutUI}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<CheckBox
|
||||||
|
MinWidth="{DynamicResource CheckBoxSize}"
|
||||||
|
MinHeight="{DynamicResource CheckBoxSize}"
|
||||||
|
IsChecked="{Binding StartGamesWithoutUI, Mode=TwoWay}"
|
||||||
|
Padding="0" />
|
||||||
|
</MenuItem.Icon>
|
||||||
|
<MenuItem.Styles>
|
||||||
|
<Style Selector="Viewbox#PART_IconPresenter">
|
||||||
|
<Setter Property="MaxHeight" Value="36" />
|
||||||
|
<Setter Property="MinHeight" Value="36" />
|
||||||
|
<Setter Property="MaxWidth" Value="36" />
|
||||||
|
<Setter Property="MinWidth" Value="36" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="ContentPresenter#PART_HeaderPresenter">
|
||||||
|
<Setter Property="Padding" Value="-10,0,0,0" />
|
||||||
|
</Style>
|
||||||
|
</MenuItem.Styles>
|
||||||
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Padding="0"
|
Padding="0"
|
||||||
IsVisible="{Binding ShowConsoleVisible}"
|
IsVisible="{Binding ShowConsoleVisible}"
|
||||||
|
|||||||
@@ -43,7 +43,13 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||||||
PauseEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Pause());
|
PauseEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Pause());
|
||||||
ResumeEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Resume());
|
ResumeEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Resume());
|
||||||
StopEmulationMenuItem.Command = new AsyncRelayCommand(() => ViewModel.AppHost?.ShowExitPrompt().OrCompleted());
|
StopEmulationMenuItem.Command = new AsyncRelayCommand(() => ViewModel.AppHost?.ShowExitPrompt().OrCompleted());
|
||||||
CheatManagerMenuItem.Command = new AsyncRelayCommand(OpenCheatManagerForCurrentApp);
|
CheatManagerMenuItem.Command = new AsyncRelayCommand(async () =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await OpenCheatManagerForCurrentApp();
|
||||||
|
} catch {}
|
||||||
|
});
|
||||||
InstallFileTypesMenuItem.Command = new AsyncRelayCommand(InstallFileTypes);
|
InstallFileTypesMenuItem.Command = new AsyncRelayCommand(InstallFileTypes);
|
||||||
UninstallFileTypesMenuItem.Command = new AsyncRelayCommand(UninstallFileTypes);
|
UninstallFileTypesMenuItem.Command = new AsyncRelayCommand(UninstallFileTypes);
|
||||||
XciTrimmerMenuItem.Command = new AsyncRelayCommand(() => XCITrimmerWindow.Show(ViewModel));
|
XciTrimmerMenuItem.Command = new AsyncRelayCommand(() => XCITrimmerWindow.Show(ViewModel));
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.Versioning;
|
using System.Runtime.Versioning;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -136,6 +137,8 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
base.OnApplyTemplate(e);
|
base.OnApplyTemplate(e);
|
||||||
|
|
||||||
NotificationHelper.SetNotificationManager(this);
|
NotificationHelper.SetNotificationManager(this);
|
||||||
|
|
||||||
|
Executor.ExecuteBackgroundAsync(ShowIntelMacWarningAsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnScalingChanged(object sender, EventArgs e)
|
private void OnScalingChanged(object sender, EventArgs e)
|
||||||
@@ -731,5 +734,20 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
(int)Symbol.Checkmark);
|
(int)Symbol.Checkmark);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool _intelMacWarningShown = !(OperatingSystem.IsMacOS() &&
|
||||||
|
(RuntimeInformation.OSArchitecture == Architecture.X64 ||
|
||||||
|
RuntimeInformation.OSArchitecture == Architecture.X86));
|
||||||
|
|
||||||
|
public static async Task ShowIntelMacWarningAsync()
|
||||||
|
{
|
||||||
|
if (_intelMacWarningShown) return;
|
||||||
|
|
||||||
|
await Dispatcher.UIThread.InvokeAsync(async () => await ContentDialogHelper.CreateWarningDialog(
|
||||||
|
"Intel Mac Warning",
|
||||||
|
"Intel Macs are not supported and will not work properly.\nIf you continue, do not come to our Discord asking for support;\nand do not report bugs on the GitHub. They will be closed."));
|
||||||
|
|
||||||
|
_intelMacWarningShown = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current version of the file format
|
/// The current version of the file format
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const int CurrentVersion = 59;
|
public const int CurrentVersion = 60;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of the configuration file format
|
/// Version of the configuration file format
|
||||||
@@ -351,6 +351,11 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool StartFullscreen { get; set; }
|
public bool StartFullscreen { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Start games with UI hidden
|
||||||
|
/// </summary>
|
||||||
|
public bool StartNoUI { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show console window
|
/// Show console window
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
UI.GridSize.Value = cff.GridSize;
|
UI.GridSize.Value = cff.GridSize;
|
||||||
UI.ApplicationSort.Value = cff.ApplicationSort;
|
UI.ApplicationSort.Value = cff.ApplicationSort;
|
||||||
UI.StartFullscreen.Value = cff.StartFullscreen;
|
UI.StartFullscreen.Value = cff.StartFullscreen;
|
||||||
|
UI.StartNoUI.Value = cff.StartNoUI;
|
||||||
UI.ShowConsole.Value = cff.ShowConsole;
|
UI.ShowConsole.Value = cff.ShowConsole;
|
||||||
UI.WindowStartup.WindowSizeWidth.Value = cff.WindowStartup.WindowSizeWidth;
|
UI.WindowStartup.WindowSizeWidth.Value = cff.WindowStartup.WindowSizeWidth;
|
||||||
UI.WindowStartup.WindowSizeHeight.Value = cff.WindowStartup.WindowSizeHeight;
|
UI.WindowStartup.WindowSizeHeight.Value = cff.WindowStartup.WindowSizeHeight;
|
||||||
@@ -414,7 +415,8 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
// This was accidentally enabled by default when it was PRed. That is not what we want,
|
// This was accidentally enabled by default when it was PRed. That is not what we want,
|
||||||
// so as a compromise users who want to use it will simply need to re-enable it once after updating.
|
// so as a compromise users who want to use it will simply need to re-enable it once after updating.
|
||||||
cff.IgnoreApplet = false;
|
cff.IgnoreApplet = false;
|
||||||
})
|
}),
|
||||||
|
(60, static cff => cff.StartNoUI = false)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,6 +152,11 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ReactiveObject<bool> StartFullscreen { get; private set; }
|
public ReactiveObject<bool> StartFullscreen { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Start games with UI hidden
|
||||||
|
/// </summary>
|
||||||
|
public ReactiveObject<bool> StartNoUI { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Hide / Show Console Window
|
/// Hide / Show Console Window
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -192,6 +197,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
WindowStartup = new WindowStartupSettings();
|
WindowStartup = new WindowStartupSettings();
|
||||||
BaseStyle = new ReactiveObject<string>();
|
BaseStyle = new ReactiveObject<string>();
|
||||||
StartFullscreen = new ReactiveObject<bool>();
|
StartFullscreen = new ReactiveObject<bool>();
|
||||||
|
StartNoUI = new ReactiveObject<bool>();
|
||||||
GameListViewMode = new ReactiveObject<int>();
|
GameListViewMode = new ReactiveObject<int>();
|
||||||
ShowNames = new ReactiveObject<bool>();
|
ShowNames = new ReactiveObject<bool>();
|
||||||
GridSize = new ReactiveObject<int>();
|
GridSize = new ReactiveObject<int>();
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
ApplicationSort = UI.ApplicationSort,
|
ApplicationSort = UI.ApplicationSort,
|
||||||
IsAscendingOrder = UI.IsAscendingOrder,
|
IsAscendingOrder = UI.IsAscendingOrder,
|
||||||
StartFullscreen = UI.StartFullscreen,
|
StartFullscreen = UI.StartFullscreen,
|
||||||
|
StartNoUI = UI.StartNoUI,
|
||||||
ShowConsole = UI.ShowConsole,
|
ShowConsole = UI.ShowConsole,
|
||||||
EnableKeyboard = Hid.EnableKeyboard,
|
EnableKeyboard = Hid.EnableKeyboard,
|
||||||
EnableMouse = Hid.EnableMouse,
|
EnableMouse = Hid.EnableMouse,
|
||||||
@@ -233,6 +234,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
UI.ApplicationSort.Value = 0;
|
UI.ApplicationSort.Value = 0;
|
||||||
UI.IsAscendingOrder.Value = true;
|
UI.IsAscendingOrder.Value = true;
|
||||||
UI.StartFullscreen.Value = false;
|
UI.StartFullscreen.Value = false;
|
||||||
|
UI.StartNoUI.Value = false;
|
||||||
UI.ShowConsole.Value = true;
|
UI.ShowConsole.Value = true;
|
||||||
UI.WindowStartup.WindowSizeWidth.Value = 1280;
|
UI.WindowStartup.WindowSizeWidth.Value = 1280;
|
||||||
UI.WindowStartup.WindowSizeHeight.Value = 760;
|
UI.WindowStartup.WindowSizeHeight.Value = 760;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace Ryujinx.Ava.Utilities
|
|||||||
{
|
{
|
||||||
public static class TitleHelper
|
public static class TitleHelper
|
||||||
{
|
{
|
||||||
public static string ActiveApplicationTitle(ProcessResult activeProcess, string applicationVersion, string pauseString = "")
|
public static string ActiveApplicationTitle(ProcessResult activeProcess, string applicationVersion, bool customTitlebar, string pauseString = "")
|
||||||
{
|
{
|
||||||
if (activeProcess == null)
|
if (activeProcess == null)
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
@@ -14,7 +14,9 @@ namespace Ryujinx.Ava.Utilities
|
|||||||
string titleIdSection = $" ({activeProcess.ProgramIdText.ToUpper()})";
|
string titleIdSection = $" ({activeProcess.ProgramIdText.ToUpper()})";
|
||||||
string titleArchSection = activeProcess.Is64Bit ? " (64-bit)" : " (32-bit)";
|
string titleArchSection = activeProcess.Is64Bit ? " (64-bit)" : " (32-bit)";
|
||||||
|
|
||||||
string appTitle = $"Ryujinx {applicationVersion} -{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}";
|
string appTitle = customTitlebar
|
||||||
|
? $"Ryujinx {applicationVersion}\n{titleNameSection.Trim()}\n{titleVersionSection.Trim()}\n{titleIdSection.Trim()}{titleArchSection}"
|
||||||
|
: $"Ryujinx {applicationVersion} -{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}";
|
||||||
|
|
||||||
return !string.IsNullOrEmpty(pauseString)
|
return !string.IsNullOrEmpty(pauseString)
|
||||||
? appTitle + $" ({pauseString})"
|
? appTitle + $" ({pauseString})"
|
||||||
|
|||||||
Reference in New Issue
Block a user