Compare commits
8 Commits
Canary-1.2
...
Canary-1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c12f52805 | ||
|
|
059fc83d4d | ||
|
|
04ce7fb764 | ||
|
|
359852b5c0 | ||
|
|
796674d9cf | ||
|
|
4efe24a3bc | ||
|
|
1a42d1396c | ||
|
|
11f29361eb |
@@ -6,4 +6,16 @@ namespace Ryujinx.Common.Configuration
|
|||||||
Unbounded,
|
Unbounded,
|
||||||
Custom
|
Custom
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class VSyncModeExtensions
|
||||||
|
{
|
||||||
|
public static VSyncMode Next(this VSyncMode vsync, bool customEnabled = false) =>
|
||||||
|
vsync switch
|
||||||
|
{
|
||||||
|
VSyncMode.Switch => customEnabled ? VSyncMode.Custom : VSyncMode.Unbounded,
|
||||||
|
VSyncMode.Unbounded => VSyncMode.Switch,
|
||||||
|
VSyncMode.Custom => VSyncMode.Unbounded,
|
||||||
|
_ => VSyncMode.Switch
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,10 +30,11 @@ namespace Ryujinx.Common
|
|||||||
|
|
||||||
public static readonly string[] GreatMetalTitles =
|
public static readonly string[] GreatMetalTitles =
|
||||||
[
|
[
|
||||||
"010076f0049a2000", // Bayonetta
|
"01009b500007c000", // ARMS
|
||||||
"0100a5c00d162000", // Cuphead
|
"0100a5c00d162000", // Cuphead
|
||||||
"010023800d64a000", // Deltarune
|
"010023800d64a000", // Deltarune
|
||||||
"01003a30012c0000", // LEGO City Undercover
|
"01003a30012c0000", // LEGO City Undercover
|
||||||
|
"010048701995e000", // Luigi's Manion 2 HD
|
||||||
"010028600EBDA000", // Mario 3D World
|
"010028600EBDA000", // Mario 3D World
|
||||||
"0100152000022000", // Mario Kart 8 Deluxe
|
"0100152000022000", // Mario Kart 8 Deluxe
|
||||||
"010075a016a3a000", // Persona 4 Arena Ultimax
|
"010075a016a3a000", // Persona 4 Arena Ultimax
|
||||||
@@ -48,10 +49,14 @@ namespace Ryujinx.Common
|
|||||||
"01009bf0072d4000", // Captain Toad: Treasure Tracker
|
"01009bf0072d4000", // Captain Toad: Treasure Tracker
|
||||||
"01009510001ca000", // Fast RMX
|
"01009510001ca000", // Fast RMX
|
||||||
"01005CA01580E000", // Persona 5 Royale
|
"01005CA01580E000", // Persona 5 Royale
|
||||||
|
"010015100b514000", // Super Mario Bros. Wonder
|
||||||
"0100000000010000", // Super Mario Odyssey
|
"0100000000010000", // Super Mario Odyssey
|
||||||
|
|
||||||
//Isaac claims it has a issue in level 2, but I am not able to replicate it on my M3. More testing would be appreciated:
|
// Further testing is appreciated, I did not test the entire game:
|
||||||
"010015100b514000", // Super Mario Bros. Wonder
|
"01007300020fa000", // Astral Chain
|
||||||
|
"010076f0049a2000", // Bayonetta
|
||||||
|
"0100cf5010fec000", // Bayonetta Origins: Cereza and the Lost Demon
|
||||||
|
"0100f4300bf2c000", // New Pokemon Snap
|
||||||
];
|
];
|
||||||
|
|
||||||
public static string GetDiscordGameAsset(string titleId)
|
public static string GetDiscordGameAsset(string titleId)
|
||||||
|
|||||||
@@ -319,31 +319,12 @@ namespace Ryujinx.Ava
|
|||||||
public void VSyncModeToggle()
|
public void VSyncModeToggle()
|
||||||
{
|
{
|
||||||
VSyncMode oldVSyncMode = Device.VSyncMode;
|
VSyncMode oldVSyncMode = Device.VSyncMode;
|
||||||
VSyncMode newVSyncMode = VSyncMode.Switch;
|
|
||||||
bool customVSyncIntervalEnabled = ConfigurationState.Instance.Graphics.EnableCustomVSyncInterval.Value;
|
bool customVSyncIntervalEnabled = ConfigurationState.Instance.Graphics.EnableCustomVSyncInterval.Value;
|
||||||
|
|
||||||
switch (oldVSyncMode)
|
UpdateVSyncMode(this, new ReactiveEventArgs<VSyncMode>(
|
||||||
{
|
oldVSyncMode,
|
||||||
case VSyncMode.Switch:
|
oldVSyncMode.Next(customVSyncIntervalEnabled))
|
||||||
newVSyncMode = VSyncMode.Unbounded;
|
);
|
||||||
break;
|
|
||||||
case VSyncMode.Unbounded:
|
|
||||||
if (customVSyncIntervalEnabled)
|
|
||||||
{
|
|
||||||
newVSyncMode = VSyncMode.Custom;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
newVSyncMode = VSyncMode.Switch;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
case VSyncMode.Custom:
|
|
||||||
newVSyncMode = VSyncMode.Switch;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
UpdateVSyncMode(this, new ReactiveEventArgs<VSyncMode>(oldVSyncMode, newVSyncMode));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateCustomVSyncIntervalValue(object sender, ReactiveEventArgs<int> e)
|
private void UpdateCustomVSyncIntervalValue(object sender, ReactiveEventArgs<int> e)
|
||||||
|
|||||||
@@ -7747,6 +7747,31 @@
|
|||||||
"zh_TW": ""
|
"zh_TW": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ID": "ControllerSettingsLedColorRainbowSpeed",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "",
|
||||||
|
"de_DE": "",
|
||||||
|
"el_GR": "",
|
||||||
|
"en_US": "Rainbow Speed",
|
||||||
|
"es_ES": "",
|
||||||
|
"fr_FR": "",
|
||||||
|
"he_IL": "",
|
||||||
|
"it_IT": "",
|
||||||
|
"ja_JP": "",
|
||||||
|
"ko_KR": "",
|
||||||
|
"no_NO": "",
|
||||||
|
"pl_PL": "",
|
||||||
|
"pt_BR": "",
|
||||||
|
"ru_RU": "",
|
||||||
|
"sv_SE": "",
|
||||||
|
"th_TH": "",
|
||||||
|
"tr_TR": "",
|
||||||
|
"uk_UA": "",
|
||||||
|
"zh_CN": "",
|
||||||
|
"zh_TW": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ID": "ControllerSettingsLedColor",
|
"ID": "ControllerSettingsLedColor",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
|
|||||||
@@ -112,7 +112,11 @@ namespace Ryujinx.Ava
|
|||||||
// Hook unhandled exception and process exit events.
|
// Hook unhandled exception and process exit events.
|
||||||
AppDomain.CurrentDomain.UnhandledException += (sender, e)
|
AppDomain.CurrentDomain.UnhandledException += (sender, e)
|
||||||
=> ProcessUnhandledException(sender, e.ExceptionObject as Exception, e.IsTerminating);
|
=> ProcessUnhandledException(sender, e.ExceptionObject as Exception, e.IsTerminating);
|
||||||
|
TaskScheduler.UnobservedTaskException += (sender, e)
|
||||||
|
=> ProcessUnhandledException(sender, e.Exception, false);
|
||||||
AppDomain.CurrentDomain.ProcessExit += (_, _) => Exit();
|
AppDomain.CurrentDomain.ProcessExit += (_, _) => Exit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Setup base data directory.
|
// Setup base data directory.
|
||||||
AppDataManager.Initialize(CommandLineState.BaseDirPathArg);
|
AppDataManager.Initialize(CommandLineState.BaseDirPathArg);
|
||||||
@@ -282,9 +286,7 @@ namespace Ryujinx.Ava
|
|||||||
log.PrintMsg(LogClass.Application, message);
|
log.PrintMsg(LogClass.Application, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (isTerminating)
|
if (isTerminating)
|
||||||
Exit();
|
Exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using System.IO;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Models
|
namespace Ryujinx.Ava.UI.Models
|
||||||
{
|
{
|
||||||
@@ -21,6 +21,11 @@ namespace Ryujinx.Ava.UI.Models
|
|||||||
public string Path { get; }
|
public string Path { get; }
|
||||||
public string Name { get; }
|
public string Name { get; }
|
||||||
|
|
||||||
|
public string FormattedName =>
|
||||||
|
InSd && ulong.TryParse(Name, NumberStyles.HexNumber, null, out ulong applicationId)
|
||||||
|
? $"Atmosphère: {System.IO.Path.GetFileNameWithoutExtension(RyujinxApp.MainWindow.ApplicationLibrary.GetNameForApplicationId(applicationId))}"
|
||||||
|
: Name;
|
||||||
|
|
||||||
public ModModel(string path, string name, bool enabled, bool inSd)
|
public ModModel(string path, string name, bool enabled, bool inSd)
|
||||||
{
|
{
|
||||||
Path = path;
|
Path = path;
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using Gommon;
|
||||||
|
using Humanizer;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
|
using Ryujinx.Ava.Utilities.Configuration;
|
||||||
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.ViewModels.Input
|
namespace Ryujinx.Ava.UI.ViewModels.Input
|
||||||
{
|
{
|
||||||
@@ -21,6 +27,19 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
|
|
||||||
[ObservableProperty] private bool _enableLedChanging;
|
[ObservableProperty] private bool _enableLedChanging;
|
||||||
[ObservableProperty] private Color _ledColor;
|
[ObservableProperty] private Color _ledColor;
|
||||||
|
|
||||||
|
public string RainbowSpeedText => RainbowSpeed.ToString(CultureInfo.CurrentCulture).Truncate(4, string.Empty);
|
||||||
|
|
||||||
|
public float RainbowSpeed
|
||||||
|
{
|
||||||
|
get => ConfigurationState.Instance.Hid.RainbowSpeed;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ConfigurationState.Instance.Hid.RainbowSpeed.Value = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
OnPropertyChanged(nameof(RainbowSpeedText));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool ShowLedColorPicker => !TurnOffLed && !UseRainbowLed;
|
public bool ShowLedColorPicker => !TurnOffLed && !UseRainbowLed;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
x:Class="Ryujinx.UI.Views.Input.LedInputView">
|
x:Class="Ryujinx.UI.Views.Input.LedInputView">
|
||||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
|
||||||
<StackPanel Orientation="Horizontal" IsVisible="{Binding ParentModel.CanClearLed}">
|
<StackPanel Orientation="Horizontal" IsVisible="{Binding ParentModel.CanClearLed}">
|
||||||
<TextBlock MinWidth="75" MaxWidth="150" Text="{ext:Locale ControllerSettingsLedColorDisable}" />
|
<TextBlock MinWidth="75" MaxWidth="200" Text="{ext:Locale ControllerSettingsLedColorDisable}" />
|
||||||
<CheckBox
|
<CheckBox
|
||||||
Margin="5"
|
Margin="5"
|
||||||
MinWidth="0"
|
MinWidth="0"
|
||||||
@@ -20,15 +20,33 @@
|
|||||||
</CheckBox>
|
</CheckBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" IsEnabled="{Binding !TurnOffLed}">
|
<StackPanel Orientation="Horizontal" IsEnabled="{Binding !TurnOffLed}">
|
||||||
<TextBlock MinWidth="75" MaxWidth="150" Text="{ext:Locale ControllerSettingsLedColorRainbow}" />
|
<TextBlock MinWidth="75" MaxWidth="200" Text="{ext:Locale ControllerSettingsLedColorRainbow}" />
|
||||||
<CheckBox
|
<CheckBox
|
||||||
Margin="5"
|
Margin="5"
|
||||||
MinWidth="0"
|
MinWidth="0"
|
||||||
IsChecked="{Binding UseRainbowLed, Mode=TwoWay}">
|
IsChecked="{Binding UseRainbowLed, Mode=TwoWay}">
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<StackPanel Orientation="Horizontal" IsEnabled="{Binding !TurnOffLed}">
|
||||||
|
<TextBlock MinWidth="75" MaxWidth="200" Text="{ext:Locale ControllerSettingsLedColorRainbowSpeed}" />
|
||||||
|
<Slider HorizontalAlignment="Center"
|
||||||
|
Value="{Binding RainbowSpeed}"
|
||||||
|
Width="175"
|
||||||
|
Margin="0,-3,0,0"
|
||||||
|
Height="32"
|
||||||
|
Padding="0,-5"
|
||||||
|
TickFrequency="0.25"
|
||||||
|
LargeChange="1"
|
||||||
|
SmallChange="0.25"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Minimum="1"
|
||||||
|
Maximum="10" />
|
||||||
|
<TextBlock Margin="5,0"
|
||||||
|
MinWidth="75"
|
||||||
|
Text="{Binding RainbowSpeedText}" />
|
||||||
|
</StackPanel>
|
||||||
<StackPanel Orientation="Horizontal" IsEnabled="{Binding ShowLedColorPicker}">
|
<StackPanel Orientation="Horizontal" IsEnabled="{Binding ShowLedColorPicker}">
|
||||||
<TextBlock MinWidth="75" MaxWidth="150" Text="{ext:Locale ControllerSettingsLedColor}" />
|
<TextBlock MinWidth="75" MaxWidth="200" Text="{ext:Locale ControllerSettingsLedColor}" />
|
||||||
<ui:ColorPickerButton
|
<ui:ColorPickerButton
|
||||||
Margin="5"
|
Margin="5"
|
||||||
IsMoreButtonVisible="False"
|
IsMoreButtonVisible="False"
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
|
||||||
using FluentAvalonia.UI.Controls;
|
using FluentAvalonia.UI.Controls;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.Models.Input;
|
using Ryujinx.Ava.UI.Models.Input;
|
||||||
using Ryujinx.Ava.UI.ViewModels.Input;
|
using Ryujinx.Ava.UI.ViewModels.Input;
|
||||||
using Ryujinx.Ava.UI.Views.Input;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Ryujinx.UI.Views.Input
|
namespace Ryujinx.UI.Views.Input
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
MaxLines="2"
|
MaxLines="2"
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
TextTrimming="CharacterEllipsis"
|
TextTrimming="CharacterEllipsis"
|
||||||
Text="{Binding Name}" />
|
Text="{Binding FormattedName}" />
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Spacing="10"
|
Spacing="10"
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
this.AttachDevTools(new KeyGesture(Key.F12, KeyModifiers.Alt));
|
this.AttachDevTools(new KeyGesture(Key.F12, KeyModifiers.Alt));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SettingsWindow()
|
public SettingsWindow()
|
||||||
|
|||||||
@@ -111,6 +111,30 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a name for an available content file based on the Application ID '<paramref name="id"/>'.
|
||||||
|
/// <br/><br/>
|
||||||
|
/// For Applications, this returns the localized name of the app found in the file.
|
||||||
|
/// For DLCs, this returns the name of the file that contains the DLC, minus the file extension.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The Application ID to search for.</param>
|
||||||
|
/// <remarks>
|
||||||
|
/// If the provided Application ID does not have a corresponding Application OR DLC file,
|
||||||
|
/// <paramref name="id"/> formatted as hexadecimal is returned.
|
||||||
|
/// </remarks>
|
||||||
|
/// <returns>A formatted Application name, or <paramref name="id"/> as hexadecimal if none is found.</returns>
|
||||||
|
public string GetNameForApplicationId(ulong id)
|
||||||
|
{
|
||||||
|
DynamicData.Kernel.Optional<ApplicationData> appData = Applications.Lookup(id);
|
||||||
|
if (appData.HasValue)
|
||||||
|
return appData.Value.Name;
|
||||||
|
|
||||||
|
if (DownloadableContents.Keys.FindFirst(x => x.TitleId == id).TryGet(out DownloadableContentModel dlcData))
|
||||||
|
return dlcData.FileName;
|
||||||
|
|
||||||
|
return id.ToString("X16");
|
||||||
|
}
|
||||||
|
|
||||||
/// <exception cref="LibHac.Common.Keys.MissingKeyException">The configured key set is missing a key.</exception>
|
/// <exception cref="LibHac.Common.Keys.MissingKeyException">The configured key set is missing a key.</exception>
|
||||||
/// <exception cref="InvalidDataException">The NCA header could not be decrypted.</exception>
|
/// <exception cref="InvalidDataException">The NCA header could not be decrypted.</exception>
|
||||||
/// <exception cref="NotSupportedException">The NCA version is not supported.</exception>
|
/// <exception cref="NotSupportedException">The NCA version is not supported.</exception>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Ryujinx.Ava.Utilities.Configuration.System;
|
using Ryujinx.Ava.Utilities.Configuration.System;
|
||||||
using Ryujinx.Ava.Utilities.Configuration.UI;
|
using Ryujinx.Ava.Utilities.Configuration.UI;
|
||||||
using Ryujinx.Common;
|
|
||||||
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;
|
||||||
@@ -8,7 +7,6 @@ using Ryujinx.Common.Logging;
|
|||||||
using Ryujinx.Common.Utilities;
|
using Ryujinx.Common.Utilities;
|
||||||
using Ryujinx.HLE;
|
using Ryujinx.HLE;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text.Json.Nodes;
|
|
||||||
|
|
||||||
namespace Ryujinx.Ava.Utilities.Configuration
|
namespace Ryujinx.Ava.Utilities.Configuration
|
||||||
{
|
{
|
||||||
@@ -17,7 +15,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The current version of the file format
|
/// The current version of the file format
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const int CurrentVersion = 61;
|
public const int CurrentVersion = 62;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Version of the configuration file format
|
/// Version of the configuration file format
|
||||||
@@ -376,24 +374,15 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public KeyboardHotkeys Hotkeys { get; set; }
|
public KeyboardHotkeys Hotkeys { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Legacy keyboard control bindings
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Kept for file format compatibility (to avoid possible failure when parsing configuration on old versions)</remarks>
|
|
||||||
/// TODO: Remove this when those older versions aren't in use anymore.
|
|
||||||
public List<JsonObject> KeyboardConfig { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Legacy controller control bindings
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Kept for file format compatibility (to avoid possible failure when parsing configuration on old versions)</remarks>
|
|
||||||
/// TODO: Remove this when those older versions aren't in use anymore.
|
|
||||||
public List<JsonObject> ControllerConfig { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Input configurations
|
/// Input configurations
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<InputConfig> InputConfig { get; set; }
|
public List<InputConfig> InputConfig { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The speed of spectrum cycling for the Rainbow LED feature.
|
||||||
|
/// </summary>
|
||||||
|
public float RainbowSpeed { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Graphics backend
|
/// Graphics backend
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
Hid.EnableMouse.Value = cff.EnableMouse;
|
Hid.EnableMouse.Value = cff.EnableMouse;
|
||||||
Hid.Hotkeys.Value = cff.Hotkeys;
|
Hid.Hotkeys.Value = cff.Hotkeys;
|
||||||
Hid.InputConfig.Value = cff.InputConfig ?? [];
|
Hid.InputConfig.Value = cff.InputConfig ?? [];
|
||||||
|
Hid.RainbowSpeed.Value = cff.RainbowSpeed;
|
||||||
|
|
||||||
Multiplayer.LanInterfaceId.Value = cff.MultiplayerLanInterfaceId;
|
Multiplayer.LanInterfaceId.Value = cff.MultiplayerLanInterfaceId;
|
||||||
Multiplayer.Mode.Value = cff.MultiplayerMode;
|
Multiplayer.Mode.Value = cff.MultiplayerMode;
|
||||||
@@ -427,7 +428,8 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
LedColor = new Color(255, 5, 1, 253).ToUInt32()
|
LedColor = new Color(255, 5, 1, 253).ToUInt32()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
})
|
}),
|
||||||
|
(62, static cff => cff.RainbowSpeed = 1f)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Ryujinx.Common.Configuration.Hid;
|
|||||||
using Ryujinx.Common.Configuration.Multiplayer;
|
using Ryujinx.Common.Configuration.Multiplayer;
|
||||||
using Ryujinx.Common.Helper;
|
using Ryujinx.Common.Helper;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
|
using Ryujinx.Common.Utilities;
|
||||||
using Ryujinx.HLE;
|
using Ryujinx.HLE;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -444,6 +445,11 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
/// TODO: Implement a ReactiveList class.
|
/// TODO: Implement a ReactiveList class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ReactiveObject<List<InputConfig>> InputConfig { get; private set; }
|
public ReactiveObject<List<InputConfig>> InputConfig { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The speed of spectrum cycling for the Rainbow LED feature.
|
||||||
|
/// </summary>
|
||||||
|
public ReactiveObject<float> RainbowSpeed { get; }
|
||||||
|
|
||||||
public HidSection()
|
public HidSection()
|
||||||
{
|
{
|
||||||
@@ -451,6 +457,8 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
EnableMouse = new ReactiveObject<bool>();
|
EnableMouse = new ReactiveObject<bool>();
|
||||||
Hotkeys = new ReactiveObject<KeyboardHotkeys>();
|
Hotkeys = new ReactiveObject<KeyboardHotkeys>();
|
||||||
InputConfig = new ReactiveObject<List<InputConfig>>();
|
InputConfig = new ReactiveObject<List<InputConfig>>();
|
||||||
|
RainbowSpeed = new ReactiveObject<float>();
|
||||||
|
RainbowSpeed.Event += (_, args) => Rainbow.Speed = args.NewValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,9 +130,8 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
EnableKeyboard = Hid.EnableKeyboard,
|
EnableKeyboard = Hid.EnableKeyboard,
|
||||||
EnableMouse = Hid.EnableMouse,
|
EnableMouse = Hid.EnableMouse,
|
||||||
Hotkeys = Hid.Hotkeys,
|
Hotkeys = Hid.Hotkeys,
|
||||||
KeyboardConfig = [],
|
|
||||||
ControllerConfig = [],
|
|
||||||
InputConfig = Hid.InputConfig,
|
InputConfig = Hid.InputConfig,
|
||||||
|
RainbowSpeed = Hid.RainbowSpeed,
|
||||||
GraphicsBackend = Graphics.GraphicsBackend,
|
GraphicsBackend = Graphics.GraphicsBackend,
|
||||||
PreferredGpu = Graphics.PreferredGpu,
|
PreferredGpu = Graphics.PreferredGpu,
|
||||||
MultiplayerLanInterfaceId = Multiplayer.LanInterfaceId,
|
MultiplayerLanInterfaceId = Multiplayer.LanInterfaceId,
|
||||||
@@ -255,6 +254,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
VolumeUp = Key.Unbound,
|
VolumeUp = Key.Unbound,
|
||||||
VolumeDown = Key.Unbound,
|
VolumeDown = Key.Unbound,
|
||||||
};
|
};
|
||||||
|
Hid.RainbowSpeed.Value = 1f;
|
||||||
Hid.InputConfig.Value =
|
Hid.InputConfig.Value =
|
||||||
[
|
[
|
||||||
new StandardKeyboardInputConfig
|
new StandardKeyboardInputConfig
|
||||||
|
|||||||
Reference in New Issue
Block a user