Added option to ignore applet (gamepad connection window will not appear when it is disconnected) (#40)

This option is under the hacks category for a reason; use if you know what you're doing.
This commit is contained in:
Vladimir Sokolov 2024-10-24 11:10:54 +10:00 committed by GitHub
parent 59277a9301
commit e30ee32eee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 58 additions and 3 deletions

View File

@ -16,7 +16,7 @@ namespace Ryujinx.UI.Common.Configuration
/// <summary>
/// The current version of the file format
/// </summary>
public const int CurrentVersion = 54;
public const int CurrentVersion = 55;
/// <summary>
/// Version of the configuration file format
@ -163,6 +163,11 @@ namespace Ryujinx.UI.Common.Configuration
/// </summary>
public bool ShowConfirmExit { get; set; }
/// <summary>
/// ignore "Applet" dialog
/// </summary>
public bool IgnoreApplet { get; set; }
/// <summary>
/// Enables or disables save window size, position and state on close.
/// </summary>

View File

@ -642,6 +642,11 @@ namespace Ryujinx.UI.Common.Configuration
/// </summary>
public ReactiveObject<bool> ShowConfirmExit { get; private set; }
/// <summary>
/// Ignore Applet
/// </summary>
public ReactiveObject<bool> IgnoreApplet { get; private set; }
/// <summary>
/// Enables or disables save window size, position and state on close.
/// </summary>
@ -668,6 +673,7 @@ namespace Ryujinx.UI.Common.Configuration
EnableDiscordIntegration = new ReactiveObject<bool>();
CheckUpdatesOnStart = new ReactiveObject<bool>();
ShowConfirmExit = new ReactiveObject<bool>();
IgnoreApplet = new ReactiveObject<bool>();
RememberWindowState = new ReactiveObject<bool>();
EnableHardwareAcceleration = new ReactiveObject<bool>();
HideCursor = new ReactiveObject<HideCursorMode>();
@ -706,6 +712,7 @@ namespace Ryujinx.UI.Common.Configuration
EnableDiscordIntegration = EnableDiscordIntegration,
CheckUpdatesOnStart = CheckUpdatesOnStart,
ShowConfirmExit = ShowConfirmExit,
IgnoreApplet = IgnoreApplet,
RememberWindowState = RememberWindowState,
EnableHardwareAcceleration = EnableHardwareAcceleration,
HideCursor = HideCursor,
@ -817,6 +824,7 @@ namespace Ryujinx.UI.Common.Configuration
EnableDiscordIntegration.Value = true;
CheckUpdatesOnStart.Value = true;
ShowConfirmExit.Value = true;
IgnoreApplet.Value = false;
RememberWindowState.Value = true;
EnableHardwareAcceleration.Value = true;
HideCursor.Value = HideCursorMode.OnIdle;
@ -1523,6 +1531,15 @@ namespace Ryujinx.UI.Common.Configuration
configurationFileUpdated = true;
}
if (configurationFileFormat.Version < 55)
{
Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 55.");
configurationFileFormat.IgnoreApplet = true;
configurationFileUpdated = true;
}
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
Graphics.ResScale.Value = configurationFileFormat.ResScale;
Graphics.ResScaleCustom.Value = configurationFileFormat.ResScaleCustom;
@ -1553,6 +1570,7 @@ namespace Ryujinx.UI.Common.Configuration
EnableDiscordIntegration.Value = configurationFileFormat.EnableDiscordIntegration;
CheckUpdatesOnStart.Value = configurationFileFormat.CheckUpdatesOnStart;
ShowConfirmExit.Value = configurationFileFormat.ShowConfirmExit;
IgnoreApplet.Value = configurationFileFormat.IgnoreApplet;
RememberWindowState.Value = configurationFileFormat.RememberWindowState;
EnableHardwareAcceleration.Value = configurationFileFormat.EnableHardwareAcceleration;
HideCursor.Value = configurationFileFormat.HideCursor;

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "تجاهل الخدمات المفقودة",
"SettingsTabSystemIgnoreApplet": "Ignore Applet",
"SettingsTabGraphics": "الرسومات",
"SettingsTabGraphicsAPI": "API الرسومات ",
"SettingsTabGraphicsEnableShaderCache": "تفعيل ذاكرة المظللات المؤقتة",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignoriere fehlende Dienste",
"SettingsTabSystemIgnoreApplet": "Applet ignorieren",
"SettingsTabGraphics": "Grafik",
"SettingsTabGraphicsAPI": "Grafik-API",
"SettingsTabGraphicsEnableShaderCache": "Shader-Cache aktivieren",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Αγνόηση υπηρεσιών που λείπουν",
"SettingsTabSystemIgnoreApplet": "Αγνοήστε το Applet",
"SettingsTabGraphics": "Γραφικά",
"SettingsTabGraphicsAPI": "API Γραφικά",
"SettingsTabGraphicsEnableShaderCache": "Ενεργοποίηση Προσωρινής Μνήμης Shader",

View File

@ -155,6 +155,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignore Missing Services",
"SettingsTabSystemIgnoreApplet": "Ignore Applet",
"SettingsTabGraphics": "Graphics",
"SettingsTabGraphicsAPI": "Graphics API",
"SettingsTabGraphicsEnableShaderCache": "Enable Shader Cache",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignorar servicios no implementados",
"SettingsTabSystemIgnoreApplet": "Ignorar el Applet",
"SettingsTabGraphics": "Gráficos",
"SettingsTabGraphicsAPI": "API de gráficos",
"SettingsTabGraphicsEnableShaderCache": "Habilitar caché de sombreadores",

View File

@ -155,6 +155,7 @@
"SettingsTabSystemDramSize8GiB": "8GiO",
"SettingsTabSystemDramSize12GiB": "12GiO",
"SettingsTabSystemIgnoreMissingServices": "Ignorer les services manquants",
"SettingsTabSystemIgnoreApplet": "Ignorer l'applet",
"SettingsTabGraphics": "Graphismes",
"SettingsTabGraphicsAPI": "API Graphique",
"SettingsTabGraphicsEnableShaderCache": "Activer le cache des shaders",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "התעלם משירותים חסרים",
"SettingsTabSystemIgnoreApplet": "Ignore Applet",
"SettingsTabGraphics": "גרפיקה",
"SettingsTabGraphicsAPI": "ממשק גראפי",
"SettingsTabGraphicsEnableShaderCache": "הפעל מטמון הצללות",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignora servizi mancanti",
"SettingsTabSystemIgnoreApplet": "Ignora l'applet",
"SettingsTabGraphics": "Grafica",
"SettingsTabGraphicsAPI": "API grafica",
"SettingsTabGraphicsEnableShaderCache": "Attiva la cache degli shader",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "未実装サービスを無視する",
"SettingsTabSystemIgnoreApplet": "アプレットを無視する",
"SettingsTabGraphics": "グラフィックス",
"SettingsTabGraphicsAPI": "グラフィックスAPI",
"SettingsTabGraphicsEnableShaderCache": "シェーダーキャッシュを有効にする",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "누락된 서비스 무시",
"SettingsTabSystemIgnoreApplet": "애플릿 무시",
"SettingsTabGraphics": "그래픽",
"SettingsTabGraphicsAPI": "그래픽 API",
"SettingsTabGraphicsEnableShaderCache": "셰이더 캐시 활성화",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignoruj Brakujące Usługi",
"SettingsTabSystemIgnoreApplet": "Ignoruj aplet",
"SettingsTabGraphics": "Grafika",
"SettingsTabGraphicsAPI": "Graficzne API",
"SettingsTabGraphicsEnableShaderCache": "Włącz pamięć podręczną cieni",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ignorar serviços não implementados",
"SettingsTabSystemIgnoreApplet": "Ignorar applet",
"SettingsTabGraphics": "Gráficos",
"SettingsTabGraphicsAPI": "API gráfica",
"SettingsTabGraphicsEnableShaderCache": "Habilitar cache de shader",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Игнорировать отсутствующие службы",
"SettingsTabSystemIgnoreApplet": "Игнорировать Апплет",
"SettingsTabGraphics": "Графика",
"SettingsTabGraphicsAPI": "Графические API",
"SettingsTabGraphicsEnableShaderCache": "Кэшировать шейдеры",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "ไม่สนใจบริการที่ขาดหายไป",
"SettingsTabSystemIgnoreApplet": "Ignore Applet",
"SettingsTabGraphics": "กราฟิก",
"SettingsTabGraphicsAPI": "กราฟฟิก API",
"SettingsTabGraphicsEnableShaderCache": "เปิดใช้งาน แคชพื้นผิวและแสงเงา",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Eksik Servisleri Görmezden Gel",
"SettingsTabSystemIgnoreApplet": "Ignore Applet",
"SettingsTabGraphics": "Grafikler",
"SettingsTabGraphicsAPI": "Grafikler API",
"SettingsTabGraphicsEnableShaderCache": "Shader Önbelleğini Etkinleştir",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "Ігнорувати відсутні служби",
"SettingsTabSystemIgnoreApplet": "Ігнорувати Аплет",
"SettingsTabGraphics": "Графіка",
"SettingsTabGraphicsAPI": "Графічний API",
"SettingsTabGraphicsEnableShaderCache": "Увімкнути кеш шейдерів",

View File

@ -107,7 +107,7 @@
"SettingsTabGeneralGameDirectories": "游戏目录",
"SettingsTabGeneralAutoloadDirectories": "自动加载DLC/游戏更新目录",
"SettingsTabGeneralAdd": "添加",
"SettingsTabGeneralRemove": "删除",
"SettingsTabGeneralRemove": "删除",
"SettingsTabSystem": "系统",
"SettingsTabSystemCore": "核心",
"SettingsTabSystemSystemRegion": "系统区域:",
@ -155,6 +155,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "忽略缺失的服务",
"SettingsTabSystemIgnoreApplet": "忽略小程序",
"SettingsTabGraphics": "图形",
"SettingsTabGraphicsAPI": "图形 API",
"SettingsTabGraphicsEnableShaderCache": "启用着色器缓存",

View File

@ -151,6 +151,7 @@
"SettingsTabSystemDramSize8GiB": "8GiB",
"SettingsTabSystemDramSize12GiB": "12GiB",
"SettingsTabSystemIgnoreMissingServices": "忽略缺少的模擬器功能",
"SettingsTabSystemIgnoreApplet": "忽略小程式",
"SettingsTabGraphics": "圖形",
"SettingsTabGraphicsAPI": "圖形 API",
"SettingsTabGraphicsEnableShaderCache": "啟用著色器快取",

View File

@ -9,6 +9,7 @@ using Ryujinx.HLE;
using Ryujinx.HLE.HOS.Applets;
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
using Ryujinx.HLE.UI;
using Ryujinx.UI.Common.Configuration;
using System;
using System.Threading;
@ -31,8 +32,15 @@ namespace Ryujinx.Ava.UI.Applet
{
ManualResetEvent dialogCloseEvent = new(false);
bool ignoreApplet = ConfigurationState.Instance.IgnoreApplet;
bool okPressed = false;
if (ignoreApplet)
{
return false;
}
Dispatcher.UIThread.InvokeAsync(async () =>
{
var response = await ControllerAppletDialog.ShowControllerAppletDialog(_parent, args);

View File

@ -144,6 +144,7 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool EnableDiscordIntegration { get; set; }
public bool CheckUpdatesOnStart { get; set; }
public bool ShowConfirmExit { get; set; }
public bool IgnoreApplet { get; set; }
public bool RememberWindowState { get; set; }
public int HideCursor { get; set; }
public bool EnableDockedMode { get; set; }
@ -407,6 +408,7 @@ namespace Ryujinx.Ava.UI.ViewModels
EnableDiscordIntegration = config.EnableDiscordIntegration;
CheckUpdatesOnStart = config.CheckUpdatesOnStart;
ShowConfirmExit = config.ShowConfirmExit;
IgnoreApplet = config.IgnoreApplet;
RememberWindowState = config.RememberWindowState;
HideCursor = (int)config.HideCursor.Value;
@ -503,6 +505,7 @@ namespace Ryujinx.Ava.UI.ViewModels
config.EnableDiscordIntegration.Value = EnableDiscordIntegration;
config.CheckUpdatesOnStart.Value = CheckUpdatesOnStart;
config.ShowConfirmExit.Value = ShowConfirmExit;
config.IgnoreApplet.Value = IgnoreApplet;
config.RememberWindowState.Value = RememberWindowState;
config.HideCursor.Value = (HideCursorMode)HideCursor;

View File

@ -238,6 +238,9 @@
ToolTip.Tip="{locale:Locale IgnoreMissingServicesTooltip}">
<TextBlock Text="{locale:Locale SettingsTabSystemIgnoreMissingServices}" />
</CheckBox>
<CheckBox IsChecked="{Binding IgnoreApplet}">
<TextBlock Text="{locale:Locale SettingsTabSystemIgnoreApplet}" />
</CheckBox>
</StackPanel>
</StackPanel>
</Border>

View File

@ -1,4 +1,4 @@
<UserControl
<UserControl
x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsUiView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"