Skip to content

Commit

Permalink
misc: some cleanups and fix compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
GreemDev committed Jan 1, 2025
1 parent 391f57b commit 88d11d3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Ryujinx/Headless/HeadlessRyujinx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static void Entrypoint(string[] args)
// Make process DPI aware for proper window sizing on high-res screens.
ForceDpiAware.Windows();

Console.Title = $"Ryujinx Console {Program.Version} (Headless)";
Console.Title = $"HeadlessRyujinx Console {Program.Version}";

if (OperatingSystem.IsMacOS() || OperatingSystem.IsLinux())
{
Expand Down
10 changes: 4 additions & 6 deletions src/Ryujinx/Headless/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,11 @@ public void InheritMainConfigInput(string[] originalArgs, ConfigurationState con
{ PlayerIndex.Player8, (nameof(InputId8), nameof(InputProfile8Name)) }
};

foreach ((PlayerIndex playerIndex, (string id, string profile)) in indicesToProperties)
foreach ((PlayerIndex playerIndex, _) in indicesToProperties
.Where(it => NeedsOverride(it.Value.InputId) && NeedsOverride(it.Value.InputProfileName)))
{
if (NeedsOverride(id) && NeedsOverride(profile))
{
configurationState.Hid.InputConfig.Value.FindFirst(x => x.PlayerIndex == playerIndex)
.IfPresent(ic => InheritedInputConfigs[playerIndex] = ic);
}
configurationState.Hid.InputConfig.Value.FindFirst(x => x.PlayerIndex == playerIndex)
.IfPresent(ic => InheritedInputConfigs[playerIndex] = ic);
}

return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ public void Sort()
// NOTE(jpr): this works around a bug where calling _views.Clear also clears SelectedDownloadableContents for
// some reason. so we save the items here and add them back after
var items = SelectedDownloadableContents.ToArray();

_views.Clear();
_views.AddRange(view);
Views.Clear();
Views.AddRange(view);

foreach (DownloadableContentModel item in items)
{
Expand Down
6 changes: 5 additions & 1 deletion src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ public MainWindowViewModel()
Applications.ToObservableChangeSet()
.Filter(Filter)
.Sort(GetComparer())
.OnItemAdded(_ => OnPropertyChanged(nameof(AppsObservableList)))
.OnItemRemoved(_ => OnPropertyChanged(nameof(AppsObservableList)))
#pragma warning disable MVVMTK0034 // Event to update is fired below
.Bind(out _appsObservableList)
#pragma warning restore MVVMTK0034
.AsObservableList();

_rendererWaitEvent = new AutoResetEvent(false);
Expand All @@ -192,8 +196,8 @@ public MainWindowViewModel()
LoadConfigurableHotKeys();

Volume = ConfigurationState.Instance.System.AudioVolume;
CustomVSyncInterval = ConfigurationState.Instance.Graphics.CustomVSyncInterval.Value;
}
CustomVSyncInterval = ConfigurationState.Instance.Graphics.CustomVSyncInterval.Value;
}

public void Initialize(
Expand Down

0 comments on commit 88d11d3

Please sign in to comment.