Use Enum and Delegate.CreateDelegate generic overloads (#3111)
* Use Enum generic overloads * Remove EnumExtensions.cs * Use Delegate.CreateDelegate generic overloads
This commit is contained in:
parent
ce71f9144e
commit
8f35345729
14 changed files with 14 additions and 26 deletions
|
@ -58,7 +58,7 @@ namespace Ryujinx.Configuration
|
|||
{
|
||||
bool noFilter = e.NewValue.Length == 0;
|
||||
|
||||
foreach (var logClass in EnumExtensions.GetValues<LogClass>())
|
||||
foreach (var logClass in Enum.GetValues<LogClass>())
|
||||
{
|
||||
Logger.SetEnable(logClass, noFilter);
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ namespace Ryujinx.Input.GTK3
|
|||
|
||||
static GTK3MappingHelper()
|
||||
{
|
||||
var inputKeys = Enum.GetValues(typeof(Key));
|
||||
var inputKeys = Enum.GetValues<Key>();
|
||||
|
||||
// GtkKey is not contiguous and quite large, so use a dictionary instead of an array.
|
||||
_gtkKeyMapping = new Dictionary<GtkKey, Key>();
|
||||
|
|
|
@ -1209,7 +1209,7 @@ namespace Ryujinx.Ui
|
|||
{
|
||||
AspectRatio aspectRatio = ConfigurationState.Instance.Graphics.AspectRatio.Value;
|
||||
|
||||
ConfigurationState.Instance.Graphics.AspectRatio.Value = ((int)aspectRatio + 1) > Enum.GetNames(typeof(AspectRatio)).Length - 1 ? AspectRatio.Fixed4x3 : aspectRatio + 1;
|
||||
ConfigurationState.Instance.Graphics.AspectRatio.Value = ((int)aspectRatio + 1) > Enum.GetNames<AspectRatio>().Length - 1 ? AspectRatio.Fixed4x3 : aspectRatio + 1;
|
||||
}
|
||||
|
||||
private void Row_Clicked(object sender, ButtonReleaseEventArgs args)
|
||||
|
|
|
@ -181,7 +181,7 @@ namespace Ryujinx.Ui.Windows
|
|||
_fsAccessLogToggle.Click();
|
||||
}
|
||||
|
||||
foreach (GraphicsDebugLevel level in Enum.GetValues(typeof(GraphicsDebugLevel)))
|
||||
foreach (GraphicsDebugLevel level in Enum.GetValues<GraphicsDebugLevel>())
|
||||
{
|
||||
_graphicsDebugLevel.Append(level.ToString(), level.ToString());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue