Compare commits

...

9 Commits

Author SHA1 Message Date
Evan Husted e00be3af86 Merge branch 'master' into hide-ui 2025-01-20 21:18:36 -06:00
Matt Zinkevicius ad3e80b383 Log .NET runtime version (#552)
I was looking into a crash, and found out it was an issue that was fixed
in .NET 9.0.1. Since Ryujinx embeds the runtime into the executable, it
not obvious which runtime a build uses. This logs the .NET runtime
version immediately after the build version.
2025-01-20 19:19:19 -06:00
Evan Husted ed64a63094 UI: Visually merge "Actions" and "Tools" menu bar items into Actions
The contents of the menu item are dependent on whether you're in a game.
No functionality has been removed.
2025-01-20 16:56:05 -06:00
Evan Husted 8df7ba2d56 i18n: Norwegian DLC RomFS dumping translation 2025-01-20 15:55:37 -06:00
LotP1 e743d78115 Add/fix service reported info (#551)
fixes the GetConfig service call, which now returns success correctly
adds support for getting the device serial number (which is fake and
reports as "RYU00000000000")
2025-01-20 14:59:54 -06:00
Your Name 6b44f32448 Update ConfigurationState.Migration.cs 2025-01-01 12:41:19 -08:00
Your Name e849f94a2e misc: Update ConfigurationState & Version
Rebased to resolve PR conflicts
2025-01-01 12:34:03 -08:00
Your Name 62f3f5414f Update locales.json
Fix missing placeholder string for recently added Swedish locale
2025-01-01 12:15:22 -08:00
Your Name cd7fbf60f8 UI: Option to automatically Hide UI when game launches
Quality of life feature. Removes the need to manually hide UI every time the game launches
2025-01-01 12:15:22 -08:00
15 changed files with 148 additions and 89 deletions
@@ -244,6 +244,15 @@ namespace Ryujinx.HLE.HOS.Services.Settings
return ResultCode.Success; return ResultCode.Success;
} }
[CommandCmif(68)]
// GetSerialNumber() -> buffer<nn::settings::system::SerialNumber, 0x16>
public ResultCode GetSerialNumber(ServiceCtx context)
{
context.ResponseData.Write(Encoding.ASCII.GetBytes("RYU00000000000"));
return ResultCode.Success;
}
[CommandCmif(77)] [CommandCmif(77)]
// GetDeviceNickName() -> buffer<nn::settings::system::DeviceNickName, 0x16> // GetDeviceNickName() -> buffer<nn::settings::system::DeviceNickName, 0x16>
public ResultCode GetDeviceNickName(ServiceCtx context) public ResultCode GetDeviceNickName(ServiceCtx context)
@@ -51,6 +51,9 @@ namespace Ryujinx.HLE.HOS.Services.Spl
context.ResponseData.Write(configValue); context.ResponseData.Write(configValue);
if (result == SmcResult.Success)
return ResultCode.Success;
return (ResultCode)((int)result << 9) | ResultCode.ModuleId; return (ResultCode)((int)result << 9) | ResultCode.ModuleId;
} }
+1 -1
View File
@@ -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;
} }
+37 -37
View File
@@ -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": {
@@ -748,32 +773,7 @@
} }
}, },
{ {
"ID": "MenuBarTools", "ID": "MenuBarActionsInstallFirmware",
"Translations": {
"ar_SA": "_الأدوات",
"de_DE": "",
"el_GR": "_Εργαλεία",
"en_US": "_Tools",
"es_ES": "_Herramientas",
"fr_FR": "_Outils",
"he_IL": "_כלים",
"it_IT": "_Strumenti",
"ja_JP": "ツール(_T)",
"ko_KR": "도구(_T)",
"no_NO": "_Verktøy",
"pl_PL": "_Narzędzia",
"pt_BR": "_Ferramentas",
"ru_RU": "_Инструменты",
"sv_SE": "V_erktyg",
"th_TH": "_เครื่องมือ",
"tr_TR": "_Araçlar",
"uk_UA": "_Інструменти",
"zh_CN": "工具(_T)",
"zh_TW": "工具(_T)"
}
},
{
"ID": "MenuBarToolsInstallFirmware",
"Translations": { "Translations": {
"ar_SA": "تثبيت البرنامج الثابت", "ar_SA": "تثبيت البرنامج الثابت",
"de_DE": "Firmware installieren", "de_DE": "Firmware installieren",
@@ -798,7 +798,7 @@
} }
}, },
{ {
"ID": "MenuBarFileToolsInstallFirmwareFromFile", "ID": "MenuBarActionsInstallFirmwareFromFile",
"Translations": { "Translations": {
"ar_SA": "تثبيت برنامج ثابت من XCI أو ZIP", "ar_SA": "تثبيت برنامج ثابت من XCI أو ZIP",
"de_DE": "Firmware von einer XCI- oder einer ZIP-Datei installieren", "de_DE": "Firmware von einer XCI- oder einer ZIP-Datei installieren",
@@ -823,7 +823,7 @@
} }
}, },
{ {
"ID": "MenuBarFileToolsInstallFirmwareFromDirectory", "ID": "MenuBarActionsInstallFirmwareFromDirectory",
"Translations": { "Translations": {
"ar_SA": "تثبيت برنامج ثابت من مجلد", "ar_SA": "تثبيت برنامج ثابت من مجلد",
"de_DE": "Firmware aus einem Verzeichnis installieren", "de_DE": "Firmware aus einem Verzeichnis installieren",
@@ -848,7 +848,7 @@
} }
}, },
{ {
"ID": "MenuBarToolsInstallKeys", "ID": "MenuBarActionsInstallKeys",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -873,7 +873,7 @@
} }
}, },
{ {
"ID": "MenuBarFileToolsInstallKeysFromFile", "ID": "MenuBarFileActionsInstallKeysFromFile",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -898,7 +898,7 @@
} }
}, },
{ {
"ID": "MenuBarFileToolsInstallKeysFromFolder", "ID": "MenuBarFileActionsInstallKeysFromFolder",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -923,7 +923,7 @@
} }
}, },
{ {
"ID": "MenuBarToolsManageFileTypes", "ID": "MenuBarActionsManageFileTypes",
"Translations": { "Translations": {
"ar_SA": "إدارة أنواع الملفات", "ar_SA": "إدارة أنواع الملفات",
"de_DE": "Dateitypen verwalten", "de_DE": "Dateitypen verwalten",
@@ -948,7 +948,7 @@
} }
}, },
{ {
"ID": "MenuBarToolsInstallFileTypes", "ID": "MenuBarActionsInstallFileTypes",
"Translations": { "Translations": {
"ar_SA": "تثبيت أنواع الملفات", "ar_SA": "تثبيت أنواع الملفات",
"de_DE": "Dateitypen installieren", "de_DE": "Dateitypen installieren",
@@ -973,7 +973,7 @@
} }
}, },
{ {
"ID": "MenuBarToolsUninstallFileTypes", "ID": "MenuBarActionsUninstallFileTypes",
"Translations": { "Translations": {
"ar_SA": "إزالة أنواع الملفات", "ar_SA": "إزالة أنواع الملفات",
"de_DE": "Dateitypen deinstallieren", "de_DE": "Dateitypen deinstallieren",
@@ -998,7 +998,7 @@
} }
}, },
{ {
"ID": "MenuBarToolsXCITrimmer", "ID": "MenuBarActionsXCITrimmer",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
@@ -2335,7 +2335,7 @@
"it_IT": "", "it_IT": "",
"ja_JP": "", "ja_JP": "",
"ko_KR": "", "ko_KR": "",
"no_NO": "", "no_NO": "Pakk ut RomFS filene fra valgt DLC fil",
"pl_PL": "", "pl_PL": "",
"pt_BR": "", "pt_BR": "",
"ru_RU": "", "ru_RU": "",
@@ -22960,7 +22960,7 @@
"it_IT": "", "it_IT": "",
"ja_JP": "", "ja_JP": "",
"ko_KR": "", "ko_KR": "",
"no_NO": "", "no_NO": "Velg en DLC og hente ut",
"pl_PL": "", "pl_PL": "",
"pt_BR": "", "pt_BR": "",
"ru_RU": "", "ru_RU": "",
+1
View File
@@ -230,6 +230,7 @@ namespace Ryujinx.Ava
internal static void PrintSystemInfo() internal static void PrintSystemInfo()
{ {
Logger.Notice.Print(LogClass.Application, $"{RyujinxApp.FullAppName} Version: {Version}"); Logger.Notice.Print(LogClass.Application, $"{RyujinxApp.FullAppName} Version: {Version}");
Logger.Notice.Print(LogClass.Application, $".NET Runtime: {RuntimeInformation.FrameworkDescription}");
SystemInfo.Gather().Print(); SystemInfo.Gather().Print();
var enabledLogLevels = Logger.GetEnabledLevels().ToArray(); var enabledLogLevels = Logger.GetEnabledLevels().ToArray();
@@ -3,14 +3,11 @@ using Avalonia.Controls;
using Avalonia.Markup.Xaml; using Avalonia.Markup.Xaml;
using Avalonia.Styling; using Avalonia.Styling;
using FluentAvalonia.UI.Controls; using FluentAvalonia.UI.Controls;
using LibHac.Tools.FsSystem.NcaUtils;
using Ryujinx.Ava.Common;
using Ryujinx.Ava.Common.Locale; using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.Common.Models; using Ryujinx.Ava.Common.Models;
using Ryujinx.Ava.UI.Helpers; using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels; using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.Utilities.AppLibrary; using Ryujinx.Ava.Utilities.AppLibrary;
using Ryujinx.Ava.Utilities.Compat;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Ryujinx.Ava.UI.Controls namespace Ryujinx.Ava.UI.Controls
@@ -22,9 +19,9 @@ namespace Ryujinx.Ava.UI.Controls
InitializeComponent(); InitializeComponent();
} }
#nullable enable #nullable enable
public static async Task<DownloadableContentModel?> Show(ulong selectedTitleId, ApplicationLibrary appLibrary) public static async Task<DownloadableContentModel?> Show(ulong selectedTitleId, ApplicationLibrary appLibrary)
#nullable disable #nullable disable
{ {
DlcSelectViewModel viewModel = new(selectedTitleId, appLibrary); DlcSelectViewModel viewModel = new(selectedTitleId, appLibrary);
@@ -52,4 +49,3 @@ namespace Ryujinx.Ava.UI.Controls
} }
} }
} }
+8 -8
View File
@@ -12,9 +12,9 @@ namespace Ryujinx.Ava.UI.Helpers
public static RelayCommand CreateConditional(Action action, Func<bool> canExecute) public static RelayCommand CreateConditional(Action action, Func<bool> canExecute)
=> new(action, canExecute); => new(action, canExecute);
public static RelayCommand<T> CreateWithArg<T>(Action<T?> action) public static RelayCommand<T> Create<T>(Action<T?> action)
=> new(action); => new(action);
public static RelayCommand<T> CreateConditionalWithArg<T>(Action<T?> action, Predicate<T?> canExecute) public static RelayCommand<T> CreateConditional<T>(Action<T?> action, Predicate<T?> canExecute)
=> new(action, canExecute); => new(action, canExecute);
public static AsyncRelayCommand Create(Func<Task> action) public static AsyncRelayCommand Create(Func<Task> action)
@@ -24,11 +24,11 @@ namespace Ryujinx.Ava.UI.Helpers
public static AsyncRelayCommand CreateSilentFail(Func<Task> action) public static AsyncRelayCommand CreateSilentFail(Func<Task> action)
=> new(action, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler); => new(action, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
public static AsyncRelayCommand<T> CreateWithArg<T>(Func<T?, Task> action) public static AsyncRelayCommand<T> Create<T>(Func<T?, Task> action)
=> new(action, AsyncRelayCommandOptions.None); => new(action, AsyncRelayCommandOptions.None);
public static AsyncRelayCommand<T> CreateConcurrentWithArg<T>(Func<T?, Task> action) public static AsyncRelayCommand<T> CreateConcurrent<T>(Func<T?, Task> action)
=> new(action, AsyncRelayCommandOptions.AllowConcurrentExecutions); => new(action, AsyncRelayCommandOptions.AllowConcurrentExecutions);
public static AsyncRelayCommand<T> CreateSilentFailWithArg<T>(Func<T?, Task> action) public static AsyncRelayCommand<T> CreateSilentFail<T>(Func<T?, Task> action)
=> new(action, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler); => new(action, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
public static AsyncRelayCommand CreateConditional(Func<Task> action, Func<bool> canExecute) public static AsyncRelayCommand CreateConditional(Func<Task> action, Func<bool> canExecute)
@@ -38,11 +38,11 @@ namespace Ryujinx.Ava.UI.Helpers
public static AsyncRelayCommand CreateSilentFailConditional(Func<Task> action, Func<bool> canExecute) public static AsyncRelayCommand CreateSilentFailConditional(Func<Task> action, Func<bool> canExecute)
=> new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler); => new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
public static AsyncRelayCommand<T> CreateConditionalWithArg<T>(Func<T?, Task> action, Predicate<T?> canExecute) public static AsyncRelayCommand<T> CreateConditional<T>(Func<T?, Task> action, Predicate<T?> canExecute)
=> new(action, canExecute, AsyncRelayCommandOptions.None); => new(action, canExecute, AsyncRelayCommandOptions.None);
public static AsyncRelayCommand<T> CreateConcurrentConditionalWithArg<T>(Func<T?, Task> action, Predicate<T?> canExecute) public static AsyncRelayCommand<T> CreateConcurrentConditional<T>(Func<T?, Task> action, Predicate<T?> canExecute)
=> new(action, canExecute, AsyncRelayCommandOptions.AllowConcurrentExecutions); => new(action, canExecute, AsyncRelayCommandOptions.AllowConcurrentExecutions);
public static AsyncRelayCommand<T> CreateSilentFailConditionalWithArg<T>(Func<T?, Task> action, Predicate<T?> canExecute) public static AsyncRelayCommand<T> CreateSilentFailConditional<T>(Func<T?, Task> action, Predicate<T?> canExecute)
=> new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler); => new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
} }
} }
@@ -488,6 +488,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;
@@ -1195,6 +1208,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;
+35 -12
View File
@@ -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}"
@@ -208,7 +231,7 @@
Name="ActionsMenuItem" Name="ActionsMenuItem"
VerticalAlignment="Center" VerticalAlignment="Center"
Header="{ext:Locale MenuBarActions}" Header="{ext:Locale MenuBarActions}"
IsEnabled="{Binding IsGameRunning}"> IsVisible="{Binding !EnableNonGameRunningControls}">
<MenuItem <MenuItem
Name="PauseEmulationMenuItem" Name="PauseEmulationMenuItem"
Header="{ext:Locale MenuBarOptionsPauseEmulation}" Header="{ext:Locale MenuBarOptionsPauseEmulation}"
@@ -265,21 +288,21 @@
Icon="{ext:Icon fa-solid fa-code}" Icon="{ext:Icon fa-solid fa-code}"
IsEnabled="{Binding IsGameRunning}" /> IsEnabled="{Binding IsGameRunning}" />
</MenuItem> </MenuItem>
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarTools}"> <MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarActions}" IsVisible="{Binding EnableNonGameRunningControls}">
<MenuItem Header="{ext:Locale MenuBarToolsInstallKeys}" Icon="{ext:Icon fa-solid fa-key}" IsEnabled="{Binding EnableNonGameRunningControls}"> <MenuItem Header="{ext:Locale MenuBarActionsInstallKeys}" Icon="{ext:Icon fa-solid fa-key}">
<MenuItem Command="{Binding InstallKeysFromFile}" Header="{ext:Locale MenuBarFileToolsInstallKeysFromFile}" Icon="{ext:Icon mdi-file-cog}" /> <MenuItem Command="{Binding InstallKeysFromFile}" Header="{ext:Locale MenuBarFileActionsInstallKeysFromFile}" Icon="{ext:Icon mdi-file-cog}" />
<MenuItem Command="{Binding InstallKeysFromFolder}" Header="{ext:Locale MenuBarFileToolsInstallKeysFromFolder}" Icon="{ext:Icon mdi-folder-cog}" /> <MenuItem Command="{Binding InstallKeysFromFolder}" Header="{ext:Locale MenuBarFileActionsInstallKeysFromFolder}" Icon="{ext:Icon mdi-folder-cog}" />
</MenuItem> </MenuItem>
<MenuItem Header="{ext:Locale MenuBarToolsInstallFirmware}" Icon="{ext:Icon fa-solid fa-download}" IsEnabled="{Binding EnableNonGameRunningControls}"> <MenuItem Header="{ext:Locale MenuBarActionsInstallFirmware}" Icon="{ext:Icon fa-solid fa-download}">
<MenuItem Command="{Binding InstallFirmwareFromFile}" Header="{ext:Locale MenuBarFileToolsInstallFirmwareFromFile}" Icon="{ext:Icon mdi-file-cog}" /> <MenuItem Command="{Binding InstallFirmwareFromFile}" Header="{ext:Locale MenuBarActionsInstallFirmwareFromFile}" Icon="{ext:Icon mdi-file-cog}" />
<MenuItem Command="{Binding InstallFirmwareFromFolder}" Header="{ext:Locale MenuBarFileToolsInstallFirmwareFromDirectory}" Icon="{ext:Icon mdi-folder-cog}" /> <MenuItem Command="{Binding InstallFirmwareFromFolder}" Header="{ext:Locale MenuBarActionsInstallFirmwareFromDirectory}" Icon="{ext:Icon mdi-folder-cog}" />
</MenuItem> </MenuItem>
<MenuItem Header="{ext:Locale MenuBarToolsManageFileTypes}" IsVisible="{Binding ManageFileTypesVisible}"> <MenuItem Header="{ext:Locale MenuBarActionsManageFileTypes}" IsVisible="{Binding ManageFileTypesVisible}">
<MenuItem Name="InstallFileTypesMenuItem" Header="{ext:Locale MenuBarToolsInstallFileTypes}" IsEnabled="{Binding AreMimeTypesRegistered, Converter={x:Static BoolConverters.Not}}" /> <MenuItem Name="InstallFileTypesMenuItem" Header="{ext:Locale MenuBarActionsInstallFileTypes}" IsEnabled="{Binding AreMimeTypesRegistered, Converter={x:Static BoolConverters.Not}}" />
<MenuItem Name="UninstallFileTypesMenuItem" Header="{ext:Locale MenuBarToolsUninstallFileTypes}" IsEnabled="{Binding AreMimeTypesRegistered}" /> <MenuItem Name="UninstallFileTypesMenuItem" Header="{ext:Locale MenuBarActionsUninstallFileTypes}" IsEnabled="{Binding AreMimeTypesRegistered}" />
</MenuItem> </MenuItem>
<Separator /> <Separator />
<MenuItem Name="XciTrimmerMenuItem" Header="{ext:Locale MenuBarToolsXCITrimmer}" IsEnabled="{Binding EnableNonGameRunningControls}" Icon="{ext:Icon fa-solid fa-scissors}" /> <MenuItem Name="XciTrimmerMenuItem" Header="{ext:Locale MenuBarActionsXCITrimmer}" Icon="{ext:Icon fa-solid fa-scissors}" />
</MenuItem> </MenuItem>
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarView}"> <MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarView}">
<MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarViewWindow}"> <MenuItem VerticalAlignment="Center" Header="{ext:Locale MenuBarViewWindow}">
@@ -37,26 +37,20 @@ namespace Ryujinx.Ava.UI.Views.Main
ToggleFileTypesMenuItem.ItemsSource = GenerateToggleFileTypeItems(); ToggleFileTypesMenuItem.ItemsSource = GenerateToggleFileTypeItems();
ChangeLanguageMenuItem.ItemsSource = GenerateLanguageMenuItems(); ChangeLanguageMenuItem.ItemsSource = GenerateLanguageMenuItems();
MiiAppletMenuItem.Command = new AsyncRelayCommand(OpenMiiApplet); MiiAppletMenuItem.Command = Commands.Create(OpenMiiApplet);
CloseRyujinxMenuItem.Command = new RelayCommand(CloseWindow); CloseRyujinxMenuItem.Command = Commands.Create(CloseWindow);
OpenSettingsMenuItem.Command = new AsyncRelayCommand(OpenSettings); OpenSettingsMenuItem.Command = Commands.Create(OpenSettings);
PauseEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Pause()); PauseEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.Pause());
ResumeEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Resume()); ResumeEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.Resume());
StopEmulationMenuItem.Command = new AsyncRelayCommand(() => ViewModel.AppHost?.ShowExitPrompt().OrCompleted()); StopEmulationMenuItem.Command = Commands.Create(() => ViewModel.AppHost?.ShowExitPrompt().OrCompleted());
CheatManagerMenuItem.Command = new AsyncRelayCommand(async () => CheatManagerMenuItem.Command = Commands.CreateSilentFail(OpenCheatManagerForCurrentApp);
{ InstallFileTypesMenuItem.Command = Commands.Create(InstallFileTypes);
try UninstallFileTypesMenuItem.Command = Commands.Create(UninstallFileTypes);
{ XciTrimmerMenuItem.Command = Commands.Create(XCITrimmerWindow.Show);
await OpenCheatManagerForCurrentApp(); AboutWindowMenuItem.Command = Commands.Create(AboutWindow.Show);
} catch {} CompatibilityListMenuItem.Command = Commands.Create(CompatibilityList.Show);
});
InstallFileTypesMenuItem.Command = new AsyncRelayCommand(InstallFileTypes);
UninstallFileTypesMenuItem.Command = new AsyncRelayCommand(UninstallFileTypes);
XciTrimmerMenuItem.Command = new AsyncRelayCommand(() => XCITrimmerWindow.Show(ViewModel));
AboutWindowMenuItem.Command = new AsyncRelayCommand(AboutWindow.Show);
CompatibilityListMenuItem.Command = new AsyncRelayCommand(CompatibilityList.Show);
UpdateMenuItem.Command = new AsyncRelayCommand(async () => UpdateMenuItem.Command = Commands.Create(async () =>
{ {
if (Updater.CanUpdate(true)) if (Updater.CanUpdate(true))
await Updater.BeginUpdateAsync(true); await Updater.BeginUpdateAsync(true);
@@ -64,12 +58,12 @@ namespace Ryujinx.Ava.UI.Views.Main
FaqMenuItem.Command = FaqMenuItem.Command =
SetupGuideMenuItem.Command = SetupGuideMenuItem.Command =
LdnGuideMenuItem.Command = new RelayCommand<string>(OpenHelper.OpenUrl); LdnGuideMenuItem.Command = Commands.Create<string>(OpenHelper.OpenUrl);
WindowSize720PMenuItem.Command = WindowSize720PMenuItem.Command =
WindowSize1080PMenuItem.Command = WindowSize1080PMenuItem.Command =
WindowSize1440PMenuItem.Command = WindowSize1440PMenuItem.Command =
WindowSize2160PMenuItem.Command = new RelayCommand<string>(ChangeWindowSize); WindowSize2160PMenuItem.Command = Commands.Create<string>(ChangeWindowSize);
} }
private IEnumerable<CheckBox> GenerateToggleFileTypeItems() => private IEnumerable<CheckBox> GenerateToggleFileTypeItems() =>
@@ -28,14 +28,14 @@ namespace Ryujinx.Ava.UI.Windows
InitializeComponent(); InitializeComponent();
} }
public static async Task Show(MainWindowViewModel mainWindowViewModel) public static async Task Show()
{ {
ContentDialog contentDialog = new() ContentDialog contentDialog = new()
{ {
PrimaryButtonText = string.Empty, PrimaryButtonText = string.Empty,
SecondaryButtonText = string.Empty, SecondaryButtonText = string.Empty,
CloseButtonText = string.Empty, CloseButtonText = string.Empty,
Content = new XCITrimmerWindow(mainWindowViewModel), Content = new XCITrimmerWindow(RyujinxApp.MainWindow.ViewModel),
Title = string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerWindowTitle]), Title = string.Format(LocaleManager.Instance[LocaleKeys.XCITrimmerWindowTitle]),
}; };
@@ -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;