mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-11-19 09:21:15 +01:00
UI: More advanced customization for what happens when Ryujinx loses focus
This commit is contained in:
1 parent
d765814a1b
commit
5ecd35a1c6
28 files changed
+287
-38
No files matched your search
@@ -1,3 +1,4 @@
|
|||||||
|
using Ryujinx.Ava.Utilities.Configuration.UI;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Configuration.Hid;
|
using Ryujinx.Common.Configuration.Hid;
|
||||||
using Ryujinx.Common.Configuration.Multiplayer;
|
using Ryujinx.Common.Configuration.Multiplayer;
|
||||||
@@ -16,7 +17,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current version of the file format
|
/// The current version of the file format
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const int CurrentVersion = 63;
|
public const int CurrentVersion = 64;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of the configuration file format
|
/// Version of the configuration file format
|
||||||
@@ -188,6 +189,11 @@ namespace Ryujinx.UI.Common.Configuration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool CheckUpdatesOnStart { get; set; }
|
public bool CheckUpdatesOnStart { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How the emulator should behave when you click off/on the window.
|
||||||
|
/// </summary>
|
||||||
|
public FocusLostType FocusLostActionType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show "Confirm Exit" Dialog
|
/// Show "Confirm Exit" Dialog
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Ryujinx.Ava.Utilities.Configuration.UI;
|
||||||
using Ryujinx.Common;
|
using Ryujinx.Common;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Configuration.Hid;
|
using Ryujinx.Common.Configuration.Hid;
|
||||||
@@ -791,6 +792,11 @@ namespace Ryujinx.UI.Common.Configuration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ReactiveObject<bool> CheckUpdatesOnStart { get; private set; }
|
public ReactiveObject<bool> CheckUpdatesOnStart { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How the emulator should behave when you click off/on the window.
|
||||||
|
/// </summary>
|
||||||
|
public ReactiveObject<FocusLostType> FocusLostActionType { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show "Confirm Exit" Dialog
|
/// Show "Confirm Exit" Dialog
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -822,6 +828,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||||||
Debug = new DebugSection();
|
Debug = new DebugSection();
|
||||||
EnableDiscordIntegration = new ReactiveObject<bool>();
|
EnableDiscordIntegration = new ReactiveObject<bool>();
|
||||||
CheckUpdatesOnStart = new ReactiveObject<bool>();
|
CheckUpdatesOnStart = new ReactiveObject<bool>();
|
||||||
|
FocusLostActionType = new ReactiveObject<FocusLostType>();
|
||||||
ShowConfirmExit = new ReactiveObject<bool>();
|
ShowConfirmExit = new ReactiveObject<bool>();
|
||||||
RememberWindowState = new ReactiveObject<bool>();
|
RememberWindowState = new ReactiveObject<bool>();
|
||||||
EnableHardwareAcceleration = new ReactiveObject<bool>();
|
EnableHardwareAcceleration = new ReactiveObject<bool>();
|
||||||
@@ -866,6 +873,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||||||
DockedMode = System.EnableDockedMode,
|
DockedMode = System.EnableDockedMode,
|
||||||
EnableDiscordIntegration = EnableDiscordIntegration,
|
EnableDiscordIntegration = EnableDiscordIntegration,
|
||||||
CheckUpdatesOnStart = CheckUpdatesOnStart,
|
CheckUpdatesOnStart = CheckUpdatesOnStart,
|
||||||
|
FocusLostActionType = FocusLostActionType,
|
||||||
ShowConfirmExit = ShowConfirmExit,
|
ShowConfirmExit = ShowConfirmExit,
|
||||||
RememberWindowState = RememberWindowState,
|
RememberWindowState = RememberWindowState,
|
||||||
EnableHardwareAcceleration = EnableHardwareAcceleration,
|
EnableHardwareAcceleration = EnableHardwareAcceleration,
|
||||||
@@ -995,6 +1003,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||||||
System.SystemTimeOffset.Value = 0;
|
System.SystemTimeOffset.Value = 0;
|
||||||
System.EnableDockedMode.Value = true;
|
System.EnableDockedMode.Value = true;
|
||||||
EnableDiscordIntegration.Value = true;
|
EnableDiscordIntegration.Value = true;
|
||||||
|
FocusLostActionType.Value = FocusLostType.DoNothing;
|
||||||
CheckUpdatesOnStart.Value = true;
|
CheckUpdatesOnStart.Value = true;
|
||||||
ShowConfirmExit.Value = true;
|
ShowConfirmExit.Value = true;
|
||||||
RememberWindowState.Value = true;
|
RememberWindowState.Value = true;
|
||||||
@@ -1841,6 +1850,17 @@ namespace Ryujinx.UI.Common.Configuration
|
|||||||
configurationFileUpdated = true;
|
configurationFileUpdated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (configurationFileFormat.Version < 64)
|
||||||
|
{
|
||||||
|
Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 64.");
|
||||||
|
|
||||||
|
configurationFileFormat.FocusLostActionType = configurationFileFormat.DisableInputWhenOutOfFocus
|
||||||
|
? FocusLostType.BlockInput
|
||||||
|
: FocusLostType.DoNothing;
|
||||||
|
|
||||||
|
configurationFileUpdated = true;
|
||||||
|
}
|
||||||
|
|
||||||
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
|
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
|
||||||
Graphics.ResScale.Value = configurationFileFormat.ResScale;
|
Graphics.ResScale.Value = configurationFileFormat.ResScale;
|
||||||
Graphics.ResScaleCustom.Value = configurationFileFormat.ResScaleCustom;
|
Graphics.ResScaleCustom.Value = configurationFileFormat.ResScaleCustom;
|
||||||
@@ -1876,6 +1896,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||||||
System.EnableDockedMode.Value = configurationFileFormat.DockedMode;
|
System.EnableDockedMode.Value = configurationFileFormat.DockedMode;
|
||||||
EnableDiscordIntegration.Value = configurationFileFormat.EnableDiscordIntegration;
|
EnableDiscordIntegration.Value = configurationFileFormat.EnableDiscordIntegration;
|
||||||
CheckUpdatesOnStart.Value = configurationFileFormat.CheckUpdatesOnStart;
|
CheckUpdatesOnStart.Value = configurationFileFormat.CheckUpdatesOnStart;
|
||||||
|
FocusLostActionType.Value = configurationFileFormat.FocusLostActionType;
|
||||||
ShowConfirmExit.Value = configurationFileFormat.ShowConfirmExit;
|
ShowConfirmExit.Value = configurationFileFormat.ShowConfirmExit;
|
||||||
RememberWindowState.Value = configurationFileFormat.RememberWindowState;
|
RememberWindowState.Value = configurationFileFormat.RememberWindowState;
|
||||||
EnableHardwareAcceleration.Value = configurationFileFormat.EnableHardwareAcceleration;
|
EnableHardwareAcceleration.Value = configurationFileFormat.EnableHardwareAcceleration;
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Ryujinx.Ava.Utilities.Configuration.UI
|
||||||
|
{
|
||||||
|
[JsonConverter(typeof(JsonStringEnumConverter<FocusLostType>))]
|
||||||
|
public enum FocusLostType
|
||||||
|
{
|
||||||
|
DoNothing,
|
||||||
|
BlockInput,
|
||||||
|
MuteAudio,
|
||||||
|
BlockInputAndMuteAudio,
|
||||||
|
PauseEmulation
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,6 +24,8 @@ namespace Ryujinx.Ava
|
|||||||
{
|
{
|
||||||
public class App : Application
|
public class App : Application
|
||||||
{
|
{
|
||||||
|
public static event Action ThemeChanged;
|
||||||
|
|
||||||
public static MainWindow MainWindow => Current!
|
public static MainWindow MainWindow => Current!
|
||||||
.ApplicationLifetime.Cast<IClassicDesktopStyleApplicationLifetime>()
|
.ApplicationLifetime.Cast<IClassicDesktopStyleApplicationLifetime>()
|
||||||
.MainWindow.Cast<MainWindow>();
|
.MainWindow.Cast<MainWindow>();
|
||||||
@@ -122,7 +124,7 @@ namespace Ryujinx.Ava
|
|||||||
|
|
||||||
ThemeVariant systemTheme = DetectSystemTheme();
|
ThemeVariant systemTheme = DetectSystemTheme();
|
||||||
|
|
||||||
ThemeManager.OnThemeChanged();
|
ThemeChanged?.Invoke();
|
||||||
|
|
||||||
RequestedThemeVariant = baseStyle switch
|
RequestedThemeVariant = baseStyle switch
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ namespace Ryujinx.Ava
|
|||||||
Device?.System.ChangeDockedModeState(e.NewValue);
|
Device?.System.ChangeDockedModeState(e.NewValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateAudioVolumeState(object sender, ReactiveEventArgs<float> e)
|
public void UpdateAudioVolumeState(object sender, ReactiveEventArgs<float> e)
|
||||||
{
|
{
|
||||||
Device?.SetVolume(e.NewValue);
|
Device?.SetVolume(e.NewValue);
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "عام",
|
"SettingsTabGeneralGeneral": "عام",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "تمكين وجود ديسكورد الغني",
|
"SettingsTabGeneralEnableDiscordRichPresence": "تمكين وجود ديسكورد الغني",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "التحقق من وجود تحديثات عند التشغيل",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "التحقق من وجود تحديثات عند التشغيل",
|
||||||
|
"SettingsTabGeneralFocusLossType": "عند فقدان تركيز المحاكي:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "لا تفعل شيئًا",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "حظر الإدخال",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "كتم الصوت",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "حظر الإدخال وكتم الصوت",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "إيقاف التشغيل مؤقتًا",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "إظهار مربع حوار \"تأكيد الخروج\"",
|
"SettingsTabGeneralShowConfirmExitDialog": "إظهار مربع حوار \"تأكيد الخروج\"",
|
||||||
"SettingsTabGeneralRememberWindowState": "تذكر حجم/موضع النافذة",
|
"SettingsTabGeneralRememberWindowState": "تذكر حجم/موضع النافذة",
|
||||||
"SettingsTabGeneralHideCursor": "إخفاء المؤشر:",
|
"SettingsTabGeneralHideCursor": "إخفاء المؤشر:",
|
||||||
|
|||||||
@@ -106,6 +106,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "Allgemein",
|
"SettingsTabGeneralGeneral": "Allgemein",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Aktiviere die Statusanzeige für Discord",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Aktiviere die Statusanzeige für Discord",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Beim Start nach Updates suchen",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Beim Start nach Updates suchen",
|
||||||
|
"SettingsTabGeneralFocusLossType": "Beim Emulator-Fokusverlust:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "لNichts tun",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Eingabe blockieren",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Lautstärke stumm",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Eingabe blockieren & Ton stumm",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "إEmulation pausieren",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "Zeige den \"Beenden bestätigen\"-Dialog",
|
"SettingsTabGeneralShowConfirmExitDialog": "Zeige den \"Beenden bestätigen\"-Dialog",
|
||||||
"SettingsTabGeneralRememberWindowState": "Fenstergröße/-position merken",
|
"SettingsTabGeneralRememberWindowState": "Fenstergröße/-position merken",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Eingabe deaktivieren wenn nicht fokussiert",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Eingabe deaktivieren wenn nicht fokussiert",
|
||||||
|
|||||||
@@ -105,6 +105,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "Γενικά",
|
"SettingsTabGeneralGeneral": "Γενικά",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Ενεργοποίηση Εμπλουτισμένης Παρουσίας Discord",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Ενεργοποίηση Εμπλουτισμένης Παρουσίας Discord",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Έλεγχος για Ενημερώσεις στην Εκκίνηση",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Έλεγχος για Ενημερώσεις στην Εκκίνηση",
|
||||||
|
"SettingsTabGeneralFocusLossType": "Απώλεια εστίασης του εξομοιωτή:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "Μη κάνεις τίποτα",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Αποκλεισμός εισόδου",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Σίγαση έντασης",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Αποκλεισμός εισόδου & σίγαση ήχου",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "Παύση προσομοίωσης",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "Εμφάνιση διαλόγου \"Επιβεβαίωση Εξόδου\".",
|
"SettingsTabGeneralShowConfirmExitDialog": "Εμφάνιση διαλόγου \"Επιβεβαίωση Εξόδου\".",
|
||||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||||
"SettingsTabGeneralHideCursor": "Απόκρυψη Κέρσορα:",
|
"SettingsTabGeneralHideCursor": "Απόκρυψη Κέρσορα:",
|
||||||
|
|||||||
@@ -113,6 +113,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "General",
|
"SettingsTabGeneralGeneral": "General",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Enable Discord Rich Presence",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Enable Discord Rich Presence",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Check for Updates on Launch",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Check for Updates on Launch",
|
||||||
|
"SettingsTabGeneralFocusLossType": "On Emulator Focus Loss:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "Do Nothing",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Block Input",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Mute Volume",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Block Input & Mute Volume",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "Pause Emulation",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "Show \"Confirm Exit\" Dialog",
|
"SettingsTabGeneralShowConfirmExitDialog": "Show \"Confirm Exit\" Dialog",
|
||||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Disable Input when Out of Focus",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Disable Input when Out of Focus",
|
||||||
|
|||||||
@@ -105,6 +105,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "General",
|
"SettingsTabGeneralGeneral": "General",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Habilitar estado en Discord",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Habilitar estado en Discord",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Buscar actualizaciones al iniciar",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Buscar actualizaciones al iniciar",
|
||||||
|
"SettingsTabGeneralFocusLossType": "Al Perder el Foco el Emulador:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "No Hacer Nada",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Bloquear Entrada",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Silenciar Volumen",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Bloquear Entrada y Silenciar el Volumen",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "Pausar Emulación",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "Mostrar diálogo de confirmación al cerrar",
|
"SettingsTabGeneralShowConfirmExitDialog": "Mostrar diálogo de confirmación al cerrar",
|
||||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Desactivar la Entrada al Perder el Foco",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Desactivar la Entrada al Perder el Foco",
|
||||||
|
|||||||
@@ -105,6 +105,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "Général",
|
"SettingsTabGeneralGeneral": "Général",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Activer Discord Rich Presence",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Activer Discord Rich Presence",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Vérifier les mises à jour au démarrage",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Vérifier les mises à jour au démarrage",
|
||||||
|
"SettingsTabGeneralFocusLossType": "Perte du Focus de l’Émulateur:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "Ne Rien Faire",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Bloquer la Saisie",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Couper le Son",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Bloquer la Saisie & Couper le Son",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "Pauser l'Émulation",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "Afficher le message de \"Confirmation de sortie\"",
|
"SettingsTabGeneralShowConfirmExitDialog": "Afficher le message de \"Confirmation de sortie\"",
|
||||||
"SettingsTabGeneralRememberWindowState": "Mémoriser la taille/position de la fenêtre",
|
"SettingsTabGeneralRememberWindowState": "Mémoriser la taille/position de la fenêtre",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Désactiver la Saisie en cas de Perte de Focus",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Désactiver la Saisie en cas de Perte de Focus",
|
||||||
|
|||||||
@@ -105,6 +105,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "כללי",
|
"SettingsTabGeneralGeneral": "כללי",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "הפעלת תצוגה עשירה בדיסקורד",
|
"SettingsTabGeneralEnableDiscordRichPresence": "הפעלת תצוגה עשירה בדיסקורד",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "בדוק אם קיימים עדכונים בהפעלה",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "בדוק אם קיימים עדכונים בהפעלה",
|
||||||
|
"SettingsTabGeneralFocusLossType": "כאשר האמולטור מאבד את הפוקוס:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "לא לעשות כלום",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "חסום קלט",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "כבה את הווליום",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "חסום קלט וכבה קול",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "השהיית האמולציה",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "הראה דיאלוג \"אשר יציאה\"",
|
"SettingsTabGeneralShowConfirmExitDialog": "הראה דיאלוג \"אשר יציאה\"",
|
||||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||||
"SettingsTabGeneralHideCursor": "הסתר את הסמן",
|
"SettingsTabGeneralHideCursor": "הסתר את הסמן",
|
||||||
|
|||||||
@@ -112,6 +112,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "Generali",
|
"SettingsTabGeneralGeneral": "Generali",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Attiva Discord Rich Presence",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Attiva Discord Rich Presence",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Controlla aggiornamenti all'avvio",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Controlla aggiornamenti all'avvio",
|
||||||
|
"SettingsTabGeneralFocusLossType": "Quando l’emulatore perde focus:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "Non fare nulla",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Blocca input",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Disattiva volume",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Blocca input & silenzia volume",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "Pausa emulazione",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "Mostra dialogo \"Conferma Uscita\"",
|
"SettingsTabGeneralShowConfirmExitDialog": "Mostra dialogo \"Conferma Uscita\"",
|
||||||
"SettingsTabGeneralRememberWindowState": "Ricorda la dimensione e la posizione della finestra",
|
"SettingsTabGeneralRememberWindowState": "Ricorda la dimensione e la posizione della finestra",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Disabilità Input quando fuori dal focus",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Disabilità Input quando fuori dal focus",
|
||||||
|
|||||||
@@ -105,6 +105,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "一般",
|
"SettingsTabGeneralGeneral": "一般",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Discord リッチプレゼンスを有効にする",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Discord リッチプレゼンスを有効にする",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "起動時にアップデートを確認する",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "起動時にアップデートを確認する",
|
||||||
|
"SettingsTabGeneralFocusLossType": "エミュレーターのフォーカス喪失時:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "何もしない",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "入力をブロック",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "音量をミュート",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "入力をブロック&音量を消音",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "エミュレーション一時停止",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "\"終了を確認\" ダイアログを表示する",
|
"SettingsTabGeneralShowConfirmExitDialog": "\"終了を確認\" ダイアログを表示する",
|
||||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||||
"SettingsTabGeneralHideCursor": "マウスカーソルを非表示",
|
"SettingsTabGeneralHideCursor": "マウスカーソルを非表示",
|
||||||
|
|||||||
@@ -107,6 +107,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "일반",
|
"SettingsTabGeneralGeneral": "일반",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "디스코드 활동 상태 활성화",
|
"SettingsTabGeneralEnableDiscordRichPresence": "디스코드 활동 상태 활성화",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "시작 시, 업데이트 확인",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "시작 시, 업데이트 확인",
|
||||||
|
"SettingsTabGeneralFocusLossType": "에뮬레이터 포커스 상실 시:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "아무것도 하지 않음",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "입력 차단",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "음소거",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "입력 차단 & 음소거",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "에뮬레이션 일시중지",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "\"종료 확인\" 대화 상자 표시",
|
"SettingsTabGeneralShowConfirmExitDialog": "\"종료 확인\" 대화 상자 표시",
|
||||||
"SettingsTabGeneralRememberWindowState": "창 크기/위치 기억",
|
"SettingsTabGeneralRememberWindowState": "창 크기/위치 기억",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "초점이 맞지 않으면 입력 비활성화",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "초점이 맞지 않으면 입력 비활성화",
|
||||||
|
|||||||
@@ -105,6 +105,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "Ogólne",
|
"SettingsTabGeneralGeneral": "Ogólne",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Włącz Bogatą Obecność Discord",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Włącz Bogatą Obecność Discord",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Sprawdzaj aktualizacje przy uruchomieniu",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Sprawdzaj aktualizacje przy uruchomieniu",
|
||||||
|
"SettingsTabGeneralFocusLossType": "Gdy emulator traci fokus:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "Nie rób nic",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Zablokuj wejście",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Wycisz głośność",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Blokuj wejście & wycisz dźwięk",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "Wstrzymaj emulację",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "Pokazuj okno dialogowe \"Potwierdź wyjście\"",
|
"SettingsTabGeneralShowConfirmExitDialog": "Pokazuj okno dialogowe \"Potwierdź wyjście\"",
|
||||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||||
"SettingsTabGeneralHideCursor": "Ukryj kursor:",
|
"SettingsTabGeneralHideCursor": "Ukryj kursor:",
|
||||||
|
|||||||
@@ -107,6 +107,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "Geral",
|
"SettingsTabGeneralGeneral": "Geral",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Habilitar Rich Presence do Discord",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Habilitar Rich Presence do Discord",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Verificar se há atualizações ao iniciar",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Verificar se há atualizações ao iniciar",
|
||||||
|
"SettingsTabGeneralFocusLossType": "Ao Perder o Foco do Emulador:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "Não Fazer Nada",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Bloquear controles",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Ficar mudo",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Bloquear controles & silenciar",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "Pausar emulação",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "Exibir diálogo de confirmação ao sair",
|
"SettingsTabGeneralShowConfirmExitDialog": "Exibir diálogo de confirmação ao sair",
|
||||||
"SettingsTabGeneralRememberWindowState": "Lembrar tamanho/posição da Janela",
|
"SettingsTabGeneralRememberWindowState": "Lembrar tamanho/posição da Janela",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Desativar Controles Quando Estiver Fora de Foco",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Desativar Controles Quando Estiver Fora de Foco",
|
||||||
|
|||||||
@@ -112,6 +112,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "Общее",
|
"SettingsTabGeneralGeneral": "Общее",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Статус активности в Discord",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Статус активности в Discord",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Проверять наличие обновлений при запуске",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Проверять наличие обновлений при запуске",
|
||||||
|
"SettingsTabGeneralFocusLossType": "При потере фокуса эмулятором:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "Ничего не делать",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Блокировать ввод",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Отключить звук",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Блокировать ввод & отключить звук",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "Пауза эмуляции",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "Подтверждать выход из приложения",
|
"SettingsTabGeneralShowConfirmExitDialog": "Подтверждать выход из приложения",
|
||||||
"SettingsTabGeneralRememberWindowState": "Запомнить размер/положение окна",
|
"SettingsTabGeneralRememberWindowState": "Запомнить размер/положение окна",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Отключить ввод при потере фокуса",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Отключить ввод при потере фокуса",
|
||||||
|
|||||||
@@ -105,6 +105,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "ทั่วไป",
|
"SettingsTabGeneralGeneral": "ทั่วไป",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "เปิดใช้งาน Discord Rich Presence",
|
"SettingsTabGeneralEnableDiscordRichPresence": "เปิดใช้งาน Discord Rich Presence",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "ตรวจหาการอัปเดตเมื่อเปิดโปรแกรม",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "ตรวจหาการอัปเดตเมื่อเปิดโปรแกรม",
|
||||||
|
"SettingsTabGeneralFocusLossType": "เมื่อโปรแกรมจำลองสูญเสียโฟกัส:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "ไม่ทำอะไร",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "บล็อกการป้อนข้อมูล",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "ปิดเสียง",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "บล็อกข้อมูล & ปิดเสียง",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "พักการจำลอง",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "แสดง \"ยืนยันการออก\" กล่องข้อความโต้ตอบ",
|
"SettingsTabGeneralShowConfirmExitDialog": "แสดง \"ยืนยันการออก\" กล่องข้อความโต้ตอบ",
|
||||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "ปิดการพิมพ์เมื่อไม่ได้เลือกช่องอินพุต ไม่ให้กรอกข้อมูลเมื่อช่องอินพุตไม่อยู่ในโฟกัส",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "ปิดการพิมพ์เมื่อไม่ได้เลือกช่องอินพุต ไม่ให้กรอกข้อมูลเมื่อช่องอินพุตไม่อยู่ในโฟกัส",
|
||||||
|
|||||||
@@ -105,6 +105,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "Genel",
|
"SettingsTabGeneralGeneral": "Genel",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Discord Zengin İçerik'i Etkinleştir",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Discord Zengin İçerik'i Etkinleştir",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Her Açılışta Güncellemeleri Denetle",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Her Açılışta Güncellemeleri Denetle",
|
||||||
|
"SettingsTabGeneralFocusLossType": "Emülatör odak kaybı:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "Hiçbir şey yapma",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Girişi Engelle",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Sesi Kapat",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Girişi engelle & sesi kapat",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "Emülasyonu Duraklat",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "\"Çıkışı Onayla\" Diyaloğunu Göster",
|
"SettingsTabGeneralShowConfirmExitDialog": "\"Çıkışı Onayla\" Diyaloğunu Göster",
|
||||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||||
"SettingsTabGeneralHideCursor": "İşaretçiyi Gizle:",
|
"SettingsTabGeneralHideCursor": "İşaretçiyi Gizle:",
|
||||||
|
|||||||
@@ -107,6 +107,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "Загальні",
|
"SettingsTabGeneralGeneral": "Загальні",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "Увімкнути розширену присутність Discord",
|
"SettingsTabGeneralEnableDiscordRichPresence": "Увімкнути розширену присутність Discord",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "Перевіряти наявність оновлень під час запуску",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "Перевіряти наявність оновлень під час запуску",
|
||||||
|
"SettingsTabGeneralFocusLossType": "При втраті фокуса емулятором:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "Нічого не робити",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "Заблокувати введення",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "Вимкнути звук",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "Блокувати введення & вимкнути звук",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "Пауза емуляції",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "Показати діалогове вікно «Підтвердити вихід».",
|
"SettingsTabGeneralShowConfirmExitDialog": "Показати діалогове вікно «Підтвердити вихід».",
|
||||||
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
"SettingsTabGeneralRememberWindowState": "Remember Window Size/Position",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Вимкнути введення, якщо вікно неактивне",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "Вимкнути введення, якщо вікно неактивне",
|
||||||
|
|||||||
@@ -107,6 +107,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "常规",
|
"SettingsTabGeneralGeneral": "常规",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "启用 Discord 在线状态展示",
|
"SettingsTabGeneralEnableDiscordRichPresence": "启用 Discord 在线状态展示",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "启动时检查更新",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "启动时检查更新",
|
||||||
|
"SettingsTabGeneralFocusLossType": "当模拟器失去焦点时:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "什么也不做",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "阻止输入",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "静音",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "阻止输入并静音",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "暂停模拟",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "退出游戏时需要确认",
|
"SettingsTabGeneralShowConfirmExitDialog": "退出游戏时需要确认",
|
||||||
"SettingsTabGeneralRememberWindowState": "记住窗口大小和位置",
|
"SettingsTabGeneralRememberWindowState": "记住窗口大小和位置",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "在后台时禁用输入",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "在后台时禁用输入",
|
||||||
|
|||||||
@@ -107,6 +107,12 @@
|
|||||||
"SettingsTabGeneralGeneral": "一般",
|
"SettingsTabGeneralGeneral": "一般",
|
||||||
"SettingsTabGeneralEnableDiscordRichPresence": "啟用 Discord 動態狀態展示",
|
"SettingsTabGeneralEnableDiscordRichPresence": "啟用 Discord 動態狀態展示",
|
||||||
"SettingsTabGeneralCheckUpdatesOnLaunch": "啟動時檢查更新",
|
"SettingsTabGeneralCheckUpdatesOnLaunch": "啟動時檢查更新",
|
||||||
|
"SettingsTabGeneralFocusLossType": "當模擬器失去焦點時:",
|
||||||
|
"SettingsTabGeneralFocusLossTypeDoNothing": "什麼都不做",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInput": "阻止輸入",
|
||||||
|
"SettingsTabGeneralFocusLossTypeMuteAudio": "靜音",
|
||||||
|
"SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio": "停用輸入 & 靜音",
|
||||||
|
"SettingsTabGeneralFocusLossTypePauseEmulation": "暫停模擬",
|
||||||
"SettingsTabGeneralShowConfirmExitDialog": "顯示「確認結束」對話方塊",
|
"SettingsTabGeneralShowConfirmExitDialog": "顯示「確認結束」對話方塊",
|
||||||
"SettingsTabGeneralRememberWindowState": "記住視窗大小/位置",
|
"SettingsTabGeneralRememberWindowState": "記住視窗大小/位置",
|
||||||
"SettingsTabGeneralDisableInputWhenOutOfFocus": "在「失去焦點」時停用輸入",
|
"SettingsTabGeneralDisableInputWhenOutOfFocus": "在「失去焦點」時停用輸入",
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Ryujinx.Ava.Common
|
|
||||||
{
|
|
||||||
public static class ThemeManager
|
|
||||||
{
|
|
||||||
public static event EventHandler ThemeChanged;
|
|
||||||
|
|
||||||
public static void OnThemeChanged()
|
|
||||||
{
|
|
||||||
ThemeChanged?.Invoke(null, EventArgs.Empty);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -29,10 +29,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
Version = Program.Version;
|
Version = Program.Version;
|
||||||
UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value);
|
UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value);
|
||||||
|
|
||||||
ThemeManager.ThemeChanged += ThemeManager_ThemeChanged;
|
App.ThemeChanged += Ryujinx_ThemeChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ThemeManager_ThemeChanged(object sender, EventArgs e)
|
private void Ryujinx_ThemeChanged()
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Post(() => UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value));
|
Dispatcher.UIThread.Post(() => UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value));
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
ThemeManager.ThemeChanged -= ThemeManager_ThemeChanged;
|
App.ThemeChanged -= Ryujinx_ThemeChanged;
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using Ryujinx.Ava.Common.Locale;
|
|||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
using Ryujinx.Ava.UI.Models.Input;
|
using Ryujinx.Ava.UI.Models.Input;
|
||||||
using Ryujinx.Ava.UI.Windows;
|
using Ryujinx.Ava.UI.Windows;
|
||||||
|
using Ryujinx.Ava.Utilities.Configuration.UI;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Configuration.Multiplayer;
|
using Ryujinx.Common.Configuration.Multiplayer;
|
||||||
using Ryujinx.Common.GraphicsDriver;
|
using Ryujinx.Common.GraphicsDriver;
|
||||||
@@ -154,6 +155,8 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
public bool EnableMouse { get; set; }
|
public bool EnableMouse { get; set; }
|
||||||
public bool DisableInputWhenOutOfFocus { get; set; }
|
public bool DisableInputWhenOutOfFocus { get; set; }
|
||||||
|
|
||||||
|
public int FocusLostActionType { get; set; }
|
||||||
|
|
||||||
public VSyncMode VSyncMode
|
public VSyncMode VSyncMode
|
||||||
{
|
{
|
||||||
get => _vSyncMode;
|
get => _vSyncMode;
|
||||||
@@ -575,6 +578,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
ShowConfirmExit = config.ShowConfirmExit;
|
ShowConfirmExit = config.ShowConfirmExit;
|
||||||
RememberWindowState = config.RememberWindowState;
|
RememberWindowState = config.RememberWindowState;
|
||||||
HideCursor = (int)config.HideCursor.Value;
|
HideCursor = (int)config.HideCursor.Value;
|
||||||
|
FocusLostActionType = (int)config.FocusLostActionType.Value;
|
||||||
|
|
||||||
GameDirectories.Clear();
|
GameDirectories.Clear();
|
||||||
GameDirectories.AddRange(config.UI.GameDirs.Value);
|
GameDirectories.AddRange(config.UI.GameDirs.Value);
|
||||||
@@ -693,6 +697,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
config.ShowConfirmExit.Value = ShowConfirmExit;
|
config.ShowConfirmExit.Value = ShowConfirmExit;
|
||||||
config.RememberWindowState.Value = RememberWindowState;
|
config.RememberWindowState.Value = RememberWindowState;
|
||||||
config.HideCursor.Value = (HideCursorMode)HideCursor;
|
config.HideCursor.Value = (HideCursorMode)HideCursor;
|
||||||
|
config.FocusLostActionType.Value = (FocusLostType)FocusLostActionType;
|
||||||
|
|
||||||
if (_gameDirectoryChanged)
|
if (_gameDirectoryChanged)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,9 +39,30 @@
|
|||||||
<CheckBox IsChecked="{Binding RememberWindowState}">
|
<CheckBox IsChecked="{Binding RememberWindowState}">
|
||||||
<TextBlock Text="{locale:Locale SettingsTabGeneralRememberWindowState}" />
|
<TextBlock Text="{locale:Locale SettingsTabGeneralRememberWindowState}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox IsChecked="{Binding DisableInputWhenOutOfFocus}">
|
<StackPanel Margin="0, 15, 0, 0" Orientation="Horizontal">
|
||||||
<TextBlock Text="{locale:Locale SettingsTabGeneralDisableInputWhenOutOfFocus}" />
|
<TextBlock VerticalAlignment="Center"
|
||||||
</CheckBox>
|
Text="{locale:Locale SettingsTabGeneralFocusLossType}"
|
||||||
|
Width="150" />
|
||||||
|
<ComboBox SelectedIndex="{Binding FocusLostActionType}"
|
||||||
|
HorizontalContentAlignment="Left"
|
||||||
|
MinWidth="100">
|
||||||
|
<ComboBoxItem>
|
||||||
|
<TextBlock Text="{locale:Locale SettingsTabGeneralFocusLossTypeDoNothing}" />
|
||||||
|
</ComboBoxItem>
|
||||||
|
<ComboBoxItem>
|
||||||
|
<TextBlock Text="{locale:Locale SettingsTabGeneralFocusLossTypeBlockInput}" />
|
||||||
|
</ComboBoxItem>
|
||||||
|
<ComboBoxItem>
|
||||||
|
<TextBlock Text="{locale:Locale SettingsTabGeneralFocusLossTypeMuteAudio}" />
|
||||||
|
</ComboBoxItem>
|
||||||
|
<ComboBoxItem>
|
||||||
|
<TextBlock Text="{locale:Locale SettingsTabGeneralFocusLossTypeBlockInputAndMuteAudio}" />
|
||||||
|
</ComboBoxItem>
|
||||||
|
<ComboBoxItem>
|
||||||
|
<TextBlock Text="{locale:Locale SettingsTabGeneralFocusLossTypePauseEmulation}" />
|
||||||
|
</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
|
</StackPanel>
|
||||||
<StackPanel Margin="0, 15, 0, 0" Orientation="Horizontal">
|
<StackPanel Margin="0, 15, 0, 0" Orientation="Horizontal">
|
||||||
<TextBlock VerticalAlignment="Center"
|
<TextBlock VerticalAlignment="Center"
|
||||||
Text="{locale:Locale SettingsTabGeneralHideCursor}"
|
Text="{locale:Locale SettingsTabGeneralHideCursor}"
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using Ryujinx.Ava.Input;
|
|||||||
using Ryujinx.Ava.UI.Applet;
|
using Ryujinx.Ava.UI.Applet;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
|
using Ryujinx.Ava.Utilities.Configuration.UI;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Graphics.Gpu;
|
using Ryujinx.Graphics.Gpu;
|
||||||
@@ -753,31 +754,116 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
|
|
||||||
private void AppWindow_OnGotFocus(object sender, FocusChangedEventArgs e)
|
private void AppWindow_OnGotFocus(object sender, FocusChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!_didDisableInputUpdates)
|
if (ViewModel.AppHost is null) return;
|
||||||
|
|
||||||
|
if (!_focusLoss.Active)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!ConfigurationState.Instance.Hid.DisableInputWhenOutOfFocus)
|
switch (_focusLoss.Type)
|
||||||
return;
|
{
|
||||||
|
case FocusLostType.BlockInput:
|
||||||
|
{
|
||||||
|
if (!ViewModel.AppHost.NpadManager.InputUpdatesBlocked)
|
||||||
|
{
|
||||||
|
_focusLoss = default;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ViewModel.AppHost is not { NpadManager.InputUpdatesBlocked: true } appHost)
|
ViewModel.AppHost.NpadManager.UnblockInputUpdates();
|
||||||
return;
|
_focusLoss = default;
|
||||||
|
break;
|
||||||
appHost.NpadManager.UnblockInputUpdates();
|
}
|
||||||
_didDisableInputUpdates = appHost.NpadManager.InputUpdatesBlocked;
|
case FocusLostType.MuteAudio:
|
||||||
|
{
|
||||||
|
if (!ViewModel.AppHost.Device.IsAudioMuted())
|
||||||
|
{
|
||||||
|
_focusLoss = default;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewModel.AppHost.Device.SetVolume(ViewModel.VolumeBeforeMute);
|
||||||
|
|
||||||
|
_focusLoss = default;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case FocusLostType.BlockInputAndMuteAudio:
|
||||||
|
{
|
||||||
|
if (!ViewModel.AppHost.Device.IsAudioMuted())
|
||||||
|
goto case FocusLostType.BlockInput;
|
||||||
|
|
||||||
|
ViewModel.AppHost.Device.SetVolume(ViewModel.VolumeBeforeMute);
|
||||||
|
ViewModel.AppHost.NpadManager.UnblockInputUpdates();
|
||||||
|
|
||||||
|
_focusLoss = default;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case FocusLostType.PauseEmulation:
|
||||||
|
{
|
||||||
|
if (!ViewModel.AppHost.Device.System.IsPaused)
|
||||||
|
{
|
||||||
|
_focusLoss = default;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewModel.AppHost.Resume();
|
||||||
|
|
||||||
|
_focusLoss = default;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool _didDisableInputUpdates;
|
private (FocusLostType Type, bool Active) _focusLoss;
|
||||||
|
|
||||||
private void AppWindow_OnLostFocus(object sender, RoutedEventArgs e)
|
private void AppWindow_OnLostFocus(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (!ConfigurationState.Instance.Hid.DisableInputWhenOutOfFocus)
|
if (ConfigurationState.Instance.FocusLostActionType.Value is FocusLostType.DoNothing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ViewModel.AppHost is not { NpadManager.InputUpdatesBlocked: false } appHost)
|
if (ViewModel.AppHost is null) return;
|
||||||
return;
|
|
||||||
|
switch (ConfigurationState.Instance.FocusLostActionType.Value)
|
||||||
|
{
|
||||||
|
case FocusLostType.BlockInput:
|
||||||
|
{
|
||||||
|
if (ViewModel.AppHost.NpadManager.InputUpdatesBlocked)
|
||||||
|
return;
|
||||||
|
|
||||||
appHost.NpadManager.BlockInputUpdates();
|
ViewModel.AppHost.NpadManager.BlockInputUpdates();
|
||||||
_didDisableInputUpdates = appHost.NpadManager.InputUpdatesBlocked;
|
_focusLoss = (FocusLostType.BlockInput, ViewModel.AppHost.NpadManager.InputUpdatesBlocked);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case FocusLostType.MuteAudio:
|
||||||
|
{
|
||||||
|
if (ViewModel.AppHost.Device.GetVolume() is 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ViewModel.VolumeBeforeMute = ViewModel.AppHost.Device.GetVolume();
|
||||||
|
ViewModel.AppHost.Device.SetVolume(0);
|
||||||
|
_focusLoss = (FocusLostType.MuteAudio, ViewModel.AppHost.Device.GetVolume() is 0f);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case FocusLostType.BlockInputAndMuteAudio:
|
||||||
|
{
|
||||||
|
if (ViewModel.AppHost.Device.GetVolume() is 0)
|
||||||
|
goto case FocusLostType.BlockInput;
|
||||||
|
|
||||||
|
ViewModel.VolumeBeforeMute = ViewModel.AppHost.Device.GetVolume();
|
||||||
|
ViewModel.AppHost.Device.SetVolume(0);
|
||||||
|
ViewModel.AppHost.NpadManager.BlockInputUpdates();
|
||||||
|
_focusLoss = (FocusLostType.BlockInputAndMuteAudio, ViewModel.AppHost.Device.GetVolume() is 0f && ViewModel.AppHost.NpadManager.InputUpdatesBlocked);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case FocusLostType.PauseEmulation:
|
||||||
|
{
|
||||||
|
if (ViewModel.AppHost.Device.System.IsPaused)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ViewModel.AppHost.Pause();
|
||||||
|
_focusLoss = (FocusLostType.PauseEmulation, ViewModel.AppHost.Device.System.IsPaused);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user