Add setting "Show Folders" to toggle using folders based on system directories

This commit is contained in:
Luke44565 2024-03-14 21:36:09 -04:00
parent 8282c7b6c6
commit 820d11fbca
22 changed files with 77 additions and 19 deletions

View file

@ -117,6 +117,10 @@ namespace Ryujinx.UI.App.Common
} }
try try
{
var FileSearchOption = SearchOption.AllDirectories;
if (ConfigurationState.Instance.UI.UseSystemGameFolders)
{ {
IEnumerable<string> folders = Directory.EnumerateDirectories(appDir, "*", SearchOption.TopDirectoryOnly); IEnumerable<string> folders = Directory.EnumerateDirectories(appDir, "*", SearchOption.TopDirectoryOnly);
foreach (string folder in folders) foreach (string folder in folders)
@ -141,7 +145,10 @@ namespace Ryujinx.UI.App.Common
}); });
} }
IEnumerable<string> files = Directory.EnumerateFiles(appDir, "*", SearchOption.TopDirectoryOnly).Where(file => FileSearchOption = SearchOption.TopDirectoryOnly;
}
IEnumerable<string> files = Directory.EnumerateFiles(appDir, "*", FileSearchOption).Where(file =>
{ {
return return
(Path.GetExtension(file).ToLower() is ".nsp" && ConfigurationState.Instance.UI.ShownFileTypes.NSP.Value) || (Path.GetExtension(file).ToLower() is ".nsp" && ConfigurationState.Instance.UI.ShownFileTypes.NSP.Value) ||

View file

@ -15,7 +15,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 = 49; public const int CurrentVersion = 50;
/// <summary> /// <summary>
/// Version of the configuration file format /// Version of the configuration file format
@ -317,6 +317,11 @@ namespace Ryujinx.UI.Common.Configuration
/// </summary> /// </summary>
public bool ShowConsole { get; set; } public bool ShowConsole { get; set; }
/// <summary>
/// use system directories when listing games
/// </summary>
public bool UseSystemGameFolders { get; set; }
/// <summary> /// <summary>
/// Enable or disable keyboard support (Independent from controllers binding) /// Enable or disable keyboard support (Independent from controllers binding)
/// </summary> /// </summary>

View file

@ -186,6 +186,11 @@ namespace Ryujinx.UI.Common.Configuration
/// </summary> /// </summary>
public ReactiveObject<bool> IsAscendingOrder { get; private set; } public ReactiveObject<bool> IsAscendingOrder { get; private set; }
/// <summary>
/// use system directories when listing games
/// </summary>
public ReactiveObject<bool> UseSystemGameFolders { get; private set; }
public UISection() public UISection()
{ {
GuiColumns = new Columns(); GuiColumns = new Columns();
@ -204,6 +209,7 @@ namespace Ryujinx.UI.Common.Configuration
IsAscendingOrder = new ReactiveObject<bool>(); IsAscendingOrder = new ReactiveObject<bool>();
LanguageCode = new ReactiveObject<string>(); LanguageCode = new ReactiveObject<string>();
ShowConsole = new ReactiveObject<bool>(); ShowConsole = new ReactiveObject<bool>();
UseSystemGameFolders = new ReactiveObject<bool>();
ShowConsole.Event += static (s, e) => { ConsoleHelper.SetConsoleWindowState(e.NewValue); }; ShowConsole.Event += static (s, e) => { ConsoleHelper.SetConsoleWindowState(e.NewValue); };
} }
} }
@ -741,6 +747,7 @@ namespace Ryujinx.UI.Common.Configuration
IsAscendingOrder = UI.IsAscendingOrder, IsAscendingOrder = UI.IsAscendingOrder,
StartFullscreen = UI.StartFullscreen, StartFullscreen = UI.StartFullscreen,
ShowConsole = UI.ShowConsole, ShowConsole = UI.ShowConsole,
UseSystemGameFolders = UI.UseSystemGameFolders,
EnableKeyboard = Hid.EnableKeyboard, EnableKeyboard = Hid.EnableKeyboard,
EnableMouse = Hid.EnableMouse, EnableMouse = Hid.EnableMouse,
Hotkeys = Hid.Hotkeys, Hotkeys = Hid.Hotkeys,
@ -836,6 +843,7 @@ namespace Ryujinx.UI.Common.Configuration
UI.IsAscendingOrder.Value = true; UI.IsAscendingOrder.Value = true;
UI.StartFullscreen.Value = false; UI.StartFullscreen.Value = false;
UI.ShowConsole.Value = true; UI.ShowConsole.Value = true;
UI.UseSystemGameFolders.Value = true;
UI.WindowStartup.WindowSizeWidth.Value = 1280; UI.WindowStartup.WindowSizeWidth.Value = 1280;
UI.WindowStartup.WindowSizeHeight.Value = 760; UI.WindowStartup.WindowSizeHeight.Value = 760;
UI.WindowStartup.WindowPositionX.Value = 0; UI.WindowStartup.WindowPositionX.Value = 0;
@ -1442,6 +1450,15 @@ namespace Ryujinx.UI.Common.Configuration
configurationFileUpdated = true; configurationFileUpdated = true;
} }
if (configurationFileFormat.Version < 50)
{
Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 50.");
configurationFileFormat.UseSystemGameFolders = true;
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;
@ -1518,6 +1535,7 @@ namespace Ryujinx.UI.Common.Configuration
UI.ApplicationSort.Value = configurationFileFormat.ApplicationSort; UI.ApplicationSort.Value = configurationFileFormat.ApplicationSort;
UI.StartFullscreen.Value = configurationFileFormat.StartFullscreen; UI.StartFullscreen.Value = configurationFileFormat.StartFullscreen;
UI.ShowConsole.Value = configurationFileFormat.ShowConsole; UI.ShowConsole.Value = configurationFileFormat.ShowConsole;
UI.UseSystemGameFolders.Value = configurationFileFormat.UseSystemGameFolders;
UI.WindowStartup.WindowSizeWidth.Value = configurationFileFormat.WindowStartup.WindowSizeWidth; UI.WindowStartup.WindowSizeWidth.Value = configurationFileFormat.WindowStartup.WindowSizeWidth;
UI.WindowStartup.WindowSizeHeight.Value = configurationFileFormat.WindowStartup.WindowSizeHeight; UI.WindowStartup.WindowSizeHeight.Value = configurationFileFormat.WindowStartup.WindowSizeHeight;
UI.WindowStartup.WindowPositionX.Value = configurationFileFormat.WindowStartup.WindowPositionX; UI.WindowStartup.WindowPositionX.Value = configurationFileFormat.WindowStartup.WindowPositionX;

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "Oberfläche", "SettingsTabGeneral": "Oberfläche",
"SettingsTabGeneralGeneral": "Allgemein", "SettingsTabGeneralGeneral": "Allgemein",
"SettingsTabGeneralEnableDiscordRichPresence": "Aktiviere die Statusanzeige für Discord", "SettingsTabGeneralEnableDiscordRichPresence": "Aktiviere die Statusanzeige für Discord",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Beim Start nach Updates suchen", "SettingsTabGeneralCheckUpdatesOnLaunch": "Beim Start nach Updates suchen",
"SettingsTabGeneralShowConfirmExitDialog": "Zeige den \"Beenden bestätigen\"-Dialog", "SettingsTabGeneralShowConfirmExitDialog": "Zeige den \"Beenden bestätigen\"-Dialog",
"SettingsTabGeneralHideCursor": "Mauszeiger ausblenden", "SettingsTabGeneralHideCursor": "Mauszeiger ausblenden",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "Εμφάνιση", "SettingsTabGeneral": "Εμφάνιση",
"SettingsTabGeneralGeneral": "Γενικά", "SettingsTabGeneralGeneral": "Γενικά",
"SettingsTabGeneralEnableDiscordRichPresence": "Ενεργοποίηση Εμπλουτισμένης Παρουσίας Discord", "SettingsTabGeneralEnableDiscordRichPresence": "Ενεργοποίηση Εμπλουτισμένης Παρουσίας Discord",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Έλεγχος για Ενημερώσεις στην Εκκίνηση", "SettingsTabGeneralCheckUpdatesOnLaunch": "Έλεγχος για Ενημερώσεις στην Εκκίνηση",
"SettingsTabGeneralShowConfirmExitDialog": "Εμφάνιση διαλόγου \"Επιβεβαίωση Εξόδου\".", "SettingsTabGeneralShowConfirmExitDialog": "Εμφάνιση διαλόγου \"Επιβεβαίωση Εξόδου\".",
"SettingsTabGeneralHideCursor": "Απόκρυψη Κέρσορα:", "SettingsTabGeneralHideCursor": "Απόκρυψη Κέρσορα:",

View file

@ -90,6 +90,7 @@
"SettingsTabGeneral": "User Interface", "SettingsTabGeneral": "User Interface",
"SettingsTabGeneralGeneral": "General", "SettingsTabGeneralGeneral": "General",
"SettingsTabGeneralEnableDiscordRichPresence": "Enable Discord Rich Presence", "SettingsTabGeneralEnableDiscordRichPresence": "Enable Discord Rich Presence",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Check for Updates on Launch", "SettingsTabGeneralCheckUpdatesOnLaunch": "Check for Updates on Launch",
"SettingsTabGeneralShowConfirmExitDialog": "Show \"Confirm Exit\" Dialog", "SettingsTabGeneralShowConfirmExitDialog": "Show \"Confirm Exit\" Dialog",
"SettingsTabGeneralHideCursor": "Hide Cursor:", "SettingsTabGeneralHideCursor": "Hide Cursor:",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "Interfaz de usuario", "SettingsTabGeneral": "Interfaz de usuario",
"SettingsTabGeneralGeneral": "General", "SettingsTabGeneralGeneral": "General",
"SettingsTabGeneralEnableDiscordRichPresence": "Habilitar estado en Discord", "SettingsTabGeneralEnableDiscordRichPresence": "Habilitar estado en Discord",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Buscar actualizaciones al iniciar", "SettingsTabGeneralCheckUpdatesOnLaunch": "Buscar actualizaciones al iniciar",
"SettingsTabGeneralShowConfirmExitDialog": "Mostrar diálogo de confirmación al cerrar", "SettingsTabGeneralShowConfirmExitDialog": "Mostrar diálogo de confirmación al cerrar",
"SettingsTabGeneralHideCursor": "Esconder el cursor:", "SettingsTabGeneralHideCursor": "Esconder el cursor:",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "Interface Utilisateur", "SettingsTabGeneral": "Interface Utilisateur",
"SettingsTabGeneralGeneral": "Général", "SettingsTabGeneralGeneral": "Général",
"SettingsTabGeneralEnableDiscordRichPresence": "Activer Discord Rich Presence", "SettingsTabGeneralEnableDiscordRichPresence": "Activer Discord Rich Presence",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Vérifier les mises à jour au démarrage", "SettingsTabGeneralCheckUpdatesOnLaunch": "Vérifier les mises à jour au démarrage",
"SettingsTabGeneralShowConfirmExitDialog": "Afficher le message de \"Confirmation de sortie\"", "SettingsTabGeneralShowConfirmExitDialog": "Afficher le message de \"Confirmation de sortie\"",
"SettingsTabGeneralHideCursor": "Masquer le Curseur :", "SettingsTabGeneralHideCursor": "Masquer le Curseur :",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "ממשק משתמש", "SettingsTabGeneral": "ממשק משתמש",
"SettingsTabGeneralGeneral": "כללי", "SettingsTabGeneralGeneral": "כללי",
"SettingsTabGeneralEnableDiscordRichPresence": "הפעלת תצוגה עשירה בדיסקורד", "SettingsTabGeneralEnableDiscordRichPresence": "הפעלת תצוגה עשירה בדיסקורד",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "בדוק אם קיימים עדכונים בהפעלה", "SettingsTabGeneralCheckUpdatesOnLaunch": "בדוק אם קיימים עדכונים בהפעלה",
"SettingsTabGeneralShowConfirmExitDialog": "הראה דיאלוג \"אשר יציאה\"", "SettingsTabGeneralShowConfirmExitDialog": "הראה דיאלוג \"אשר יציאה\"",
"SettingsTabGeneralHideCursor": "הסתר את הסמן", "SettingsTabGeneralHideCursor": "הסתר את הסמן",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "Interfaccia utente", "SettingsTabGeneral": "Interfaccia utente",
"SettingsTabGeneralGeneral": "Generali", "SettingsTabGeneralGeneral": "Generali",
"SettingsTabGeneralEnableDiscordRichPresence": "Attiva Discord Rich Presence", "SettingsTabGeneralEnableDiscordRichPresence": "Attiva Discord Rich Presence",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Controlla aggiornamenti all'avvio", "SettingsTabGeneralCheckUpdatesOnLaunch": "Controlla aggiornamenti all'avvio",
"SettingsTabGeneralShowConfirmExitDialog": "Mostra dialogo \"Conferma Uscita\"", "SettingsTabGeneralShowConfirmExitDialog": "Mostra dialogo \"Conferma Uscita\"",
"SettingsTabGeneralHideCursor": "Nascondi il cursore:", "SettingsTabGeneralHideCursor": "Nascondi il cursore:",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "ユーザインタフェース", "SettingsTabGeneral": "ユーザインタフェース",
"SettingsTabGeneralGeneral": "一般", "SettingsTabGeneralGeneral": "一般",
"SettingsTabGeneralEnableDiscordRichPresence": "Discord リッチプレゼンスを有効にする", "SettingsTabGeneralEnableDiscordRichPresence": "Discord リッチプレゼンスを有効にする",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "起動時にアップデートを確認する", "SettingsTabGeneralCheckUpdatesOnLaunch": "起動時にアップデートを確認する",
"SettingsTabGeneralShowConfirmExitDialog": "\"終了を確認\" ダイアログを表示する", "SettingsTabGeneralShowConfirmExitDialog": "\"終了を確認\" ダイアログを表示する",
"SettingsTabGeneralHideCursor": "マウスカーソルを非表示", "SettingsTabGeneralHideCursor": "マウスカーソルを非表示",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "사용자 인터페이스", "SettingsTabGeneral": "사용자 인터페이스",
"SettingsTabGeneralGeneral": "일반", "SettingsTabGeneralGeneral": "일반",
"SettingsTabGeneralEnableDiscordRichPresence": "디스코드 활동 상태 활성화", "SettingsTabGeneralEnableDiscordRichPresence": "디스코드 활동 상태 활성화",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "시작 시, 업데이트 확인", "SettingsTabGeneralCheckUpdatesOnLaunch": "시작 시, 업데이트 확인",
"SettingsTabGeneralShowConfirmExitDialog": "\"종료 확인\" 대화 상자 표시", "SettingsTabGeneralShowConfirmExitDialog": "\"종료 확인\" 대화 상자 표시",
"SettingsTabGeneralHideCursor": "마우스 커서 숨기기", "SettingsTabGeneralHideCursor": "마우스 커서 숨기기",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "Interfejs Użytkownika", "SettingsTabGeneral": "Interfejs Użytkownika",
"SettingsTabGeneralGeneral": "Ogólne", "SettingsTabGeneralGeneral": "Ogólne",
"SettingsTabGeneralEnableDiscordRichPresence": "Włącz Bogatą Obecność Discord", "SettingsTabGeneralEnableDiscordRichPresence": "Włącz Bogatą Obecność Discord",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Sprawdź Aktualizacje przy Uruchomieniu", "SettingsTabGeneralCheckUpdatesOnLaunch": "Sprawdź Aktualizacje przy Uruchomieniu",
"SettingsTabGeneralShowConfirmExitDialog": "Pokaż Okno Dialogowe \"Potwierdzenia Wyjścia\"", "SettingsTabGeneralShowConfirmExitDialog": "Pokaż Okno Dialogowe \"Potwierdzenia Wyjścia\"",
"SettingsTabGeneralHideCursor": "Ukryj kursor:", "SettingsTabGeneralHideCursor": "Ukryj kursor:",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "Geral", "SettingsTabGeneral": "Geral",
"SettingsTabGeneralGeneral": "Geral", "SettingsTabGeneralGeneral": "Geral",
"SettingsTabGeneralEnableDiscordRichPresence": "Habilitar Rich Presence do Discord", "SettingsTabGeneralEnableDiscordRichPresence": "Habilitar Rich Presence do Discord",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Verificar se há atualizações ao iniciar", "SettingsTabGeneralCheckUpdatesOnLaunch": "Verificar se há atualizações ao iniciar",
"SettingsTabGeneralShowConfirmExitDialog": "Exibir diálogo de confirmação ao sair", "SettingsTabGeneralShowConfirmExitDialog": "Exibir diálogo de confirmação ao sair",
"SettingsTabGeneralHideCursor": "Esconder o cursor do mouse:", "SettingsTabGeneralHideCursor": "Esconder o cursor do mouse:",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "Пользовательский интерфейс", "SettingsTabGeneral": "Пользовательский интерфейс",
"SettingsTabGeneralGeneral": "Общее", "SettingsTabGeneralGeneral": "Общее",
"SettingsTabGeneralEnableDiscordRichPresence": "Включить Discord Rich Presence", "SettingsTabGeneralEnableDiscordRichPresence": "Включить Discord Rich Presence",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Проверять наличие обновлений при запуске", "SettingsTabGeneralCheckUpdatesOnLaunch": "Проверять наличие обновлений при запуске",
"SettingsTabGeneralShowConfirmExitDialog": "Показать диалоговое окно \"Подтвердить выход\"", "SettingsTabGeneralShowConfirmExitDialog": "Показать диалоговое окно \"Подтвердить выход\"",
"SettingsTabGeneralHideCursor": "Скрыть курсор", "SettingsTabGeneralHideCursor": "Скрыть курсор",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "Kullancı Arayüzü", "SettingsTabGeneral": "Kullancı Arayüzü",
"SettingsTabGeneralGeneral": "Genel", "SettingsTabGeneralGeneral": "Genel",
"SettingsTabGeneralEnableDiscordRichPresence": "Discord Zengin İçerik'i Etkinleştir", "SettingsTabGeneralEnableDiscordRichPresence": "Discord Zengin İçerik'i Etkinleştir",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Her Açılışta Güncellemeleri Denetle", "SettingsTabGeneralCheckUpdatesOnLaunch": "Her Açılışta Güncellemeleri Denetle",
"SettingsTabGeneralShowConfirmExitDialog": "\"Çıkışı Onayla\" Diyaloğunu Göster", "SettingsTabGeneralShowConfirmExitDialog": "\"Çıkışı Onayla\" Diyaloğunu Göster",
"SettingsTabGeneralHideCursor": "İşaretçiyi Gizle:", "SettingsTabGeneralHideCursor": "İşaretçiyi Gizle:",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "Інтерфейс користувача", "SettingsTabGeneral": "Інтерфейс користувача",
"SettingsTabGeneralGeneral": "Загальні", "SettingsTabGeneralGeneral": "Загальні",
"SettingsTabGeneralEnableDiscordRichPresence": "Увімкнути розширену присутність Discord", "SettingsTabGeneralEnableDiscordRichPresence": "Увімкнути розширену присутність Discord",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "Перевіряти наявність оновлень під час запуску", "SettingsTabGeneralCheckUpdatesOnLaunch": "Перевіряти наявність оновлень під час запуску",
"SettingsTabGeneralShowConfirmExitDialog": "Показати діалогове вікно «Підтвердити вихід».", "SettingsTabGeneralShowConfirmExitDialog": "Показати діалогове вікно «Підтвердити вихід».",
"SettingsTabGeneralHideCursor": "Hide Cursor:", "SettingsTabGeneralHideCursor": "Hide Cursor:",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "用户界面", "SettingsTabGeneral": "用户界面",
"SettingsTabGeneralGeneral": "常规", "SettingsTabGeneralGeneral": "常规",
"SettingsTabGeneralEnableDiscordRichPresence": "启用 Discord 在线状态展示", "SettingsTabGeneralEnableDiscordRichPresence": "启用 Discord 在线状态展示",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "自动检查更新", "SettingsTabGeneralCheckUpdatesOnLaunch": "自动检查更新",
"SettingsTabGeneralShowConfirmExitDialog": "显示 \"确认退出\" 对话框", "SettingsTabGeneralShowConfirmExitDialog": "显示 \"确认退出\" 对话框",
"SettingsTabGeneralHideCursor": "隐藏鼠标指针:", "SettingsTabGeneralHideCursor": "隐藏鼠标指针:",

View file

@ -85,6 +85,7 @@
"SettingsTabGeneral": "使用者介面", "SettingsTabGeneral": "使用者介面",
"SettingsTabGeneralGeneral": "一般", "SettingsTabGeneralGeneral": "一般",
"SettingsTabGeneralEnableDiscordRichPresence": "啟用 Discord 動態狀態展示", "SettingsTabGeneralEnableDiscordRichPresence": "啟用 Discord 動態狀態展示",
"SettingsTabGeneralUseSystemGameFolders": "Show Folders",
"SettingsTabGeneralCheckUpdatesOnLaunch": "自動檢查更新", "SettingsTabGeneralCheckUpdatesOnLaunch": "自動檢查更新",
"SettingsTabGeneralShowConfirmExitDialog": "顯示「確認離開」對話框", "SettingsTabGeneralShowConfirmExitDialog": "顯示「確認離開」對話框",
"SettingsTabGeneralHideCursor": "隱藏滑鼠遊標:", "SettingsTabGeneralHideCursor": "隱藏滑鼠遊標:",

View file

@ -132,6 +132,7 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool EnableDiscordIntegration { get; set; } public bool EnableDiscordIntegration { get; set; }
public bool CheckUpdatesOnStart { get; set; } public bool CheckUpdatesOnStart { get; set; }
public bool ShowConfirmExit { get; set; } public bool ShowConfirmExit { get; set; }
public bool UseSystemGameFolders { get; set; }
public int HideCursor { get; set; } public int HideCursor { get; set; }
public bool EnableDockedMode { get; set; } public bool EnableDockedMode { get; set; }
public bool EnableKeyboard { get; set; } public bool EnableKeyboard { get; set; }
@ -405,6 +406,7 @@ namespace Ryujinx.Ava.UI.ViewModels
EnableDiscordIntegration = config.EnableDiscordIntegration; EnableDiscordIntegration = config.EnableDiscordIntegration;
CheckUpdatesOnStart = config.CheckUpdatesOnStart; CheckUpdatesOnStart = config.CheckUpdatesOnStart;
ShowConfirmExit = config.ShowConfirmExit; ShowConfirmExit = config.ShowConfirmExit;
UseSystemGameFolders = config.UI.UseSystemGameFolders;
HideCursor = (int)config.HideCursor.Value; HideCursor = (int)config.HideCursor.Value;
GameDirectories.Clear(); GameDirectories.Clear();
@ -489,6 +491,7 @@ namespace Ryujinx.Ava.UI.ViewModels
config.EnableDiscordIntegration.Value = EnableDiscordIntegration; config.EnableDiscordIntegration.Value = EnableDiscordIntegration;
config.CheckUpdatesOnStart.Value = CheckUpdatesOnStart; config.CheckUpdatesOnStart.Value = CheckUpdatesOnStart;
config.ShowConfirmExit.Value = ShowConfirmExit; config.ShowConfirmExit.Value = ShowConfirmExit;
config.UI.UseSystemGameFolders.Value = UseSystemGameFolders;
config.HideCursor.Value = (HideCursorMode)HideCursor; config.HideCursor.Value = (HideCursorMode)HideCursor;
if (_directoryChanged) if (_directoryChanged)

View file

@ -36,6 +36,9 @@
<CheckBox IsChecked="{Binding ShowConfirmExit}"> <CheckBox IsChecked="{Binding ShowConfirmExit}">
<TextBlock Text="{locale:Locale SettingsTabGeneralShowConfirmExitDialog}" /> <TextBlock Text="{locale:Locale SettingsTabGeneralShowConfirmExitDialog}" />
</CheckBox> </CheckBox>
<CheckBox IsChecked="{Binding UseSystemGameFolders}">
<TextBlock Text="{locale:Locale SettingsTabGeneralUseSystemGameFolders}" />
</CheckBox>
<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}"

View file

@ -541,6 +541,12 @@ namespace Ryujinx.Ava.UI.Windows
_isLoading = true; _isLoading = true;
if (ViewModel.IsInFolder && !ConfigurationState.Instance.UI.UseSystemGameFolders)
{
ViewModel.PathHistory.Clear();
ViewModel.IsInFolder = false;
}
Thread applicationLibraryThread = new(() => Thread applicationLibraryThread = new(() =>
{ {
if (ViewModel.IsInFolder) if (ViewModel.IsInFolder)