diff options
Diffstat (limited to 'Ryujinx/Ui/MainWindow.cs')
-rw-r--r-- | Ryujinx/Ui/MainWindow.cs | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index e0252016..3e513dd2 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -119,6 +119,12 @@ namespace Ryujinx.Ui [GUI] CheckMenuItem _fileExtToggle; [GUI] CheckMenuItem _pathToggle; [GUI] CheckMenuItem _fileSizeToggle; + [GUI] CheckMenuItem _nspShown; + [GUI] CheckMenuItem _pfs0Shown; + [GUI] CheckMenuItem _xciShown; + [GUI] CheckMenuItem _ncaShown; + [GUI] CheckMenuItem _nroShown; + [GUI] CheckMenuItem _nsoShown; [GUI] Label _gpuBackend; [GUI] Label _dockedMode; [GUI] Label _aspectRatio; @@ -220,6 +226,20 @@ namespace Ryujinx.Ui _pauseEmulation.Sensitive = false; _resumeEmulation.Sensitive = false; + _nspShown.Active = ConfigurationState.Instance.Ui.ShownFileTypes.NSP.Value; + _pfs0Shown.Active = ConfigurationState.Instance.Ui.ShownFileTypes.PFS0.Value; + _xciShown.Active = ConfigurationState.Instance.Ui.ShownFileTypes.XCI.Value; + _ncaShown.Active = ConfigurationState.Instance.Ui.ShownFileTypes.NCA.Value; + _nroShown.Active = ConfigurationState.Instance.Ui.ShownFileTypes.NRO.Value; + _nsoShown.Active = ConfigurationState.Instance.Ui.ShownFileTypes.NSO.Value; + + _nspShown.Toggled += NSP_Shown_Toggled; + _pfs0Shown.Toggled += PFS0_Shown_Toggled; + _xciShown.Toggled += XCI_Shown_Toggled; + _ncaShown.Toggled += NCA_Shown_Toggled; + _nroShown.Toggled += NRO_Shown_Toggled; + _nsoShown.Toggled += NSO_Shown_Toggled; + _fileTypesSubMenu.Visible = FileAssociationHelper.IsTypeAssociationSupported; if (ConfigurationState.Instance.Ui.GuiColumns.FavColumn) _favToggle.Active = true; @@ -1757,6 +1777,54 @@ namespace Ryujinx.Ui UpdateColumns(); } + private void NSP_Shown_Toggled(object sender, EventArgs args) + { + ConfigurationState.Instance.Ui.ShownFileTypes.NSP.Value = _nspShown.Active; + + SaveConfig(); + UpdateGameTable(); + } + + private void PFS0_Shown_Toggled(object sender, EventArgs args) + { + ConfigurationState.Instance.Ui.ShownFileTypes.PFS0.Value = _pfs0Shown.Active; + + SaveConfig(); + UpdateGameTable(); + } + + private void XCI_Shown_Toggled (object sender, EventArgs args) + { + ConfigurationState.Instance.Ui.ShownFileTypes.XCI.Value = _xciShown.Active; + + SaveConfig(); + UpdateGameTable(); + } + + private void NCA_Shown_Toggled (object sender, EventArgs args) + { + ConfigurationState.Instance.Ui.ShownFileTypes.NCA.Value = _ncaShown.Active; + + SaveConfig(); + UpdateGameTable(); + } + + private void NRO_Shown_Toggled (object sender, EventArgs args) + { + ConfigurationState.Instance.Ui.ShownFileTypes.NRO.Value = _nroShown.Active; + + SaveConfig(); + UpdateGameTable(); + } + + private void NSO_Shown_Toggled (object sender, EventArgs args) + { + ConfigurationState.Instance.Ui.ShownFileTypes.NSO.Value = _nsoShown.Active; + + SaveConfig(); + UpdateGameTable(); + } + private void RefreshList_Pressed(object sender, ButtonReleaseEventArgs args) { UpdateGameTable(); |