Compare commits
18 Commits
Canary-1.2
...
222875d5cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
222875d5cc | ||
|
|
5276991517 | ||
|
|
898153ae13 | ||
|
|
96e9e3611d | ||
|
|
9aa834c268 | ||
|
|
97dfeae99f | ||
|
|
740e35872d | ||
|
|
2c4236f733 | ||
|
|
e945565259 | ||
|
|
bdaaddb591 | ||
|
|
488b09f974 | ||
|
|
f4c3a2e487 | ||
|
|
eff11f52a8 | ||
|
|
c21aa86a7b | ||
|
|
861531f431 | ||
|
|
6c0526c59f | ||
|
|
e861204078 | ||
|
|
8904397685 |
4
.github/labeler.yml
vendored
4
.github/labeler.yml
vendored
@@ -18,10 +18,6 @@ gpu:
|
|||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file: ['src/Ryujinx.Graphics.Vulkan/**', 'src/Spv.Generator/**']
|
- any-glob-to-any-file: ['src/Ryujinx.Graphics.Vulkan/**', 'src/Spv.Generator/**']
|
||||||
|
|
||||||
'graphics-backend:metal':
|
|
||||||
- changed-files:
|
|
||||||
- any-glob-to-any-file: ['src/Ryujinx.Graphics.Metal/**', 'src/Ryujinx.Graphics.Metal.SharpMetalExtensions/**']
|
|
||||||
|
|
||||||
gui:
|
gui:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
- any-glob-to-any-file: ['src/Ryujinx/**', 'src/Ryujinx.UI.Common/**', 'src/Ryujinx.UI.LocaleGenerator/**']
|
- any-glob-to-any-file: ['src/Ryujinx/**', 'src/Ryujinx.UI.Common/**', 'src/Ryujinx.UI.LocaleGenerator/**']
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<PackageVersion Include="Ryujinx.Graphics.Nvdec.Dependencies" Version="5.0.3-build14" />
|
<PackageVersion Include="Ryujinx.Graphics.Nvdec.Dependencies" Version="5.0.3-build14" />
|
||||||
<PackageVersion Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Version="1.2.0" />
|
<PackageVersion Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Version="1.2.0" />
|
||||||
<PackageVersion Include="Ryujinx.SDL2-CS" Version="2.30.0-build32" />
|
<PackageVersion Include="Ryujinx.SDL2-CS" Version="2.30.0-build32" />
|
||||||
<PackageVersion Include="Gommon" Version="2.7.1" />
|
<PackageVersion Include="Gommon" Version="2.7.0.2" />
|
||||||
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
|
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
|
||||||
<PackageVersion Include="Sep" Version="0.6.0" />
|
<PackageVersion Include="Sep" Version="0.6.0" />
|
||||||
<PackageVersion Include="shaderc.net" Version="0.1.0" />
|
<PackageVersion Include="shaderc.net" Version="0.1.0" />
|
||||||
|
|||||||
@@ -54,13 +54,12 @@ failing to meet this requirement may result in a poor gameplay experience or une
|
|||||||
|
|
||||||
## Latest build
|
## Latest build
|
||||||
|
|
||||||
Stable builds are made every so often, based on the `master` branch, that then gets put into the releases you know and love.
|
Stable builds are made every so often onto a separate "release" branch that then gets put into the releases you know and love.
|
||||||
These stable builds exist so that the end user can get a more **enjoyable and stable experience**.
|
These stable builds exist so that the end user can get a more **enjoyable and stable experience**.
|
||||||
They are released every month or so, to ensure consistent updates, while not being an annoying amount of individual updates to download over the course of that month.
|
|
||||||
|
|
||||||
You can find the latest stable release [here](https://github.com/GreemDev/Ryujinx/releases/latest).
|
You can find the latest stable release [here](https://github.com/GreemDev/Ryujinx/releases/latest).
|
||||||
|
|
||||||
Canary builds are compiled automatically for each commit on the `master` branch.
|
Canary builds are compiled automatically for each commit on the master branch.
|
||||||
While we strive to ensure optimal stability and performance prior to pushing an update, these builds **may be unstable or completely broken**.
|
While we strive to ensure optimal stability and performance prior to pushing an update, these builds **may be unstable or completely broken**.
|
||||||
These canary builds are only recommended for experienced users.
|
These canary builds are only recommended for experienced users.
|
||||||
|
|
||||||
@@ -110,7 +109,7 @@ If you are planning to contribute or just want to learn more about this project
|
|||||||
- **Configuration**
|
- **Configuration**
|
||||||
|
|
||||||
The emulator has settings for enabling or disabling some logging, remapping controllers, and more.
|
The emulator has settings for enabling or disabling some logging, remapping controllers, and more.
|
||||||
You can configure all of them through the graphical interface or manually through the config file, `Config.json`, found in the Ryujinx data folder which can be accessed by clicking `Open Ryujinx Folder` under the File menu in the GUI.
|
You can configure all of them through the graphical interface or manually through the config file, `Config.json`, found in the user folder which can be accessed by clicking `Open Ryujinx Folder` under the File menu in the GUI.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -2,24 +2,14 @@
|
|||||||
{
|
{
|
||||||
public class LedConfigController
|
public class LedConfigController
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Enable LED color changing by the emulator
|
|
||||||
/// </summary>
|
|
||||||
public bool EnableLed { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Ignores the color and disables the LED entirely.
|
|
||||||
/// </summary>
|
|
||||||
public bool TurnOffLed { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Ignores the color and uses the rainbow color functionality for the LED.
|
|
||||||
/// </summary>
|
|
||||||
public bool UseRainbow { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Packed RGB int of the color
|
/// Packed RGB int of the color
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint LedColor { get; set; }
|
public uint LedColor { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Enable LED color changing by the emulator
|
||||||
|
/// </summary>
|
||||||
|
public bool EnableLed { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
// ReSharper disable MemberCanBePrivate.Global
|
|
||||||
// ReSharper disable InconsistentNaming
|
|
||||||
|
|
||||||
namespace Ryujinx.Common.Helper
|
|
||||||
{
|
|
||||||
public static class RunningPlatform
|
|
||||||
{
|
|
||||||
public static bool IsMacOS => OperatingSystem.IsMacOS();
|
|
||||||
public static bool IsWindows => OperatingSystem.IsWindows();
|
|
||||||
public static bool IsLinux => OperatingSystem.IsLinux();
|
|
||||||
|
|
||||||
public static bool IsIntelMac => IsMacOS && RuntimeInformation.OSArchitecture is Architecture.X64;
|
|
||||||
public static bool IsArmMac => IsMacOS && RuntimeInformation.OSArchitecture is Architecture.Arm64;
|
|
||||||
|
|
||||||
public static bool IsX64Windows => IsWindows && (RuntimeInformation.OSArchitecture is Architecture.X64);
|
|
||||||
public static bool IsArmWindows => IsWindows && (RuntimeInformation.OSArchitecture is Architecture.Arm64);
|
|
||||||
|
|
||||||
public static bool IsX64Linux => IsLinux && (RuntimeInformation.OSArchitecture is Architecture.X64);
|
|
||||||
public static bool IsArmLinux => IsLinux && (RuntimeInformation.OSArchitecture is Architecture.Arm64);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
using Gommon;
|
using Gommon;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Helper;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
@@ -9,7 +8,7 @@ namespace Ryujinx.Common
|
|||||||
{
|
{
|
||||||
public static class TitleIDs
|
public static class TitleIDs
|
||||||
{
|
{
|
||||||
public static ReactiveObject<Optional<string>> CurrentApplication { get; } = new();
|
public static ReactiveObject<Optional<string>> CurrentApplication { get; set; } = new();
|
||||||
|
|
||||||
public static GraphicsBackend SelectGraphicsBackend(string titleId, GraphicsBackend currentBackend)
|
public static GraphicsBackend SelectGraphicsBackend(string titleId, GraphicsBackend currentBackend)
|
||||||
{
|
{
|
||||||
@@ -22,7 +21,7 @@ namespace Ryujinx.Common
|
|||||||
return currentBackend;
|
return currentBackend;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RunningPlatform.IsArmMac)
|
if (!(OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture is Architecture.Arm64))
|
||||||
return GraphicsBackend.Vulkan;
|
return GraphicsBackend.Vulkan;
|
||||||
|
|
||||||
return GreatMetalTitles.ContainsIgnoreCase(titleId) ? GraphicsBackend.Metal : GraphicsBackend.Vulkan;
|
return GreatMetalTitles.ContainsIgnoreCase(titleId) ? GraphicsBackend.Metal : GraphicsBackend.Vulkan;
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
using Gommon;
|
|
||||||
using System;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Ryujinx.Common.Utilities
|
|
||||||
{
|
|
||||||
public static class Rainbow
|
|
||||||
{
|
|
||||||
public static bool CyclingEnabled { get; set; }
|
|
||||||
|
|
||||||
public static void Enable()
|
|
||||||
{
|
|
||||||
if (!CyclingEnabled)
|
|
||||||
{
|
|
||||||
CyclingEnabled = true;
|
|
||||||
Executor.ExecuteBackgroundAsync(async () =>
|
|
||||||
{
|
|
||||||
while (CyclingEnabled)
|
|
||||||
{
|
|
||||||
await Task.Delay(15);
|
|
||||||
Tick();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Disable()
|
|
||||||
{
|
|
||||||
CyclingEnabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static float Speed { get; set; } = 1;
|
|
||||||
|
|
||||||
public static Color Color { get; private set; } = Color.Blue;
|
|
||||||
|
|
||||||
public static void Tick()
|
|
||||||
{
|
|
||||||
Color = HsbToRgb((Color.GetHue() + Speed) / 360);
|
|
||||||
|
|
||||||
UpdatedHandler.Call(Color.ToArgb());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Reset()
|
|
||||||
{
|
|
||||||
Color = Color.Blue;
|
|
||||||
UpdatedHandler.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static event Action<int> Updated
|
|
||||||
{
|
|
||||||
add => UpdatedHandler.Add(value);
|
|
||||||
remove => UpdatedHandler.Remove(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static Event<int> UpdatedHandler = new();
|
|
||||||
|
|
||||||
private static Color HsbToRgb(float hue, float saturation = 1, float brightness = 1)
|
|
||||||
{
|
|
||||||
int r = 0, g = 0, b = 0;
|
|
||||||
if (saturation == 0)
|
|
||||||
{
|
|
||||||
r = g = b = (int)(brightness * 255.0f + 0.5f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
float h = (hue - (float)Math.Floor(hue)) * 6.0f;
|
|
||||||
float f = h - (float)Math.Floor(h);
|
|
||||||
float p = brightness * (1.0f - saturation);
|
|
||||||
float q = brightness * (1.0f - saturation * f);
|
|
||||||
float t = brightness * (1.0f - (saturation * (1.0f - f)));
|
|
||||||
switch ((int)h)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
r = (int)(brightness * 255.0f + 0.5f);
|
|
||||||
g = (int)(t * 255.0f + 0.5f);
|
|
||||||
b = (int)(p * 255.0f + 0.5f);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
r = (int)(q * 255.0f + 0.5f);
|
|
||||||
g = (int)(brightness * 255.0f + 0.5f);
|
|
||||||
b = (int)(p * 255.0f + 0.5f);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
r = (int)(p * 255.0f + 0.5f);
|
|
||||||
g = (int)(brightness * 255.0f + 0.5f);
|
|
||||||
b = (int)(t * 255.0f + 0.5f);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
r = (int)(p * 255.0f + 0.5f);
|
|
||||||
g = (int)(q * 255.0f + 0.5f);
|
|
||||||
b = (int)(brightness * 255.0f + 0.5f);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
r = (int)(t * 255.0f + 0.5f);
|
|
||||||
g = (int)(p * 255.0f + 0.5f);
|
|
||||||
b = (int)(brightness * 255.0f + 0.5f);
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
r = (int)(brightness * 255.0f + 0.5f);
|
|
||||||
g = (int)(p * 255.0f + 0.5f);
|
|
||||||
b = (int)(q * 255.0f + 0.5f);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Color.FromArgb(Convert.ToByte(255), Convert.ToByte(r), Convert.ToByte(g), Convert.ToByte(b));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -659,7 +659,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
|||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(filePath))
|
if (string.IsNullOrWhiteSpace(filePath))
|
||||||
{
|
{
|
||||||
throw new InvalidSystemResourceException("JIT (010000000000003B) system title not found! The JIT will not work, provide the system archive to fix this error. (See https://github.com/Ryubing/Ryujinx#requirements for more information)");
|
throw new InvalidSystemResourceException("JIT (010000000000003B) system title not found! The JIT will not work, provide the system archive to fix this error. (See https://github.com/GreemDev/Ryujinx#requirements for more information)");
|
||||||
}
|
}
|
||||||
|
|
||||||
context.Device.LoadNca(filePath);
|
context.Device.LoadNca(filePath);
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pl
|
|||||||
titleName = "Unknown";
|
titleName = "Unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new InvalidSystemResourceException($"{titleName} ({fontTitle:x8}) system title not found! This font will not work, provide the system archive to fix this error. (See https://github.com/Ryubing/Ryujinx#requirements for more information)");
|
throw new InvalidSystemResourceException($"{titleName} ({fontTitle:x8}) system title not found! This font will not work, provide the system archive to fix this error. (See https://github.com/GreemDev/Ryujinx#requirements for more information)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -161,20 +161,5 @@ namespace Ryujinx.HLE
|
|||||||
{
|
{
|
||||||
return 1000 / _frameRate[FrameTypeGame];
|
return 1000 / _frameRate[FrameTypeGame];
|
||||||
}
|
}
|
||||||
|
|
||||||
public string FormatGameFrameRate()
|
|
||||||
{
|
|
||||||
double frameRate = GetGameFrameRate();
|
|
||||||
double frameTime = GetGameFrameTime();
|
|
||||||
|
|
||||||
return $"{frameRate:00.00} FPS ({frameTime:00.00}ms)";
|
|
||||||
}
|
|
||||||
|
|
||||||
public string FormatFifoPercent()
|
|
||||||
{
|
|
||||||
double fifoPercent = GetFifoPercent();
|
|
||||||
|
|
||||||
return $"FIFO: {fifoPercent:00.00}%";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ namespace Ryujinx.HLE
|
|||||||
|
|
||||||
public int CpuCoresCount = 4; //Switch 1 has 4 cores
|
public int CpuCoresCount = 4; //Switch 1 has 4 cores
|
||||||
|
|
||||||
public VSyncMode VSyncMode { get; set; }
|
public VSyncMode VSyncMode { get; set; } = VSyncMode.Switch;
|
||||||
public bool CustomVSyncIntervalEnabled { get; set; }
|
public bool CustomVSyncIntervalEnabled { get; set; } = false;
|
||||||
public int CustomVSyncInterval { get; set; }
|
public int CustomVSyncInterval { get; set; }
|
||||||
|
|
||||||
public long TargetVSyncInterval { get; set; } = 60;
|
public long TargetVSyncInterval { get; set; } = 60;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using Ryujinx.Common.Configuration.Hid;
|
using Ryujinx.Common.Configuration.Hid;
|
||||||
using Ryujinx.Common.Configuration.Hid.Controller;
|
using Ryujinx.Common.Configuration.Hid.Controller;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Common.Utilities;
|
|
||||||
using Ryujinx.HLE.HOS.Services.Hid;
|
using Ryujinx.HLE.HOS.Services.Hid;
|
||||||
using SDL2;
|
using SDL2;
|
||||||
using System;
|
using System;
|
||||||
@@ -104,16 +103,17 @@ namespace Ryujinx.Input.SDL2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLed(uint packedRgb)
|
public void SetLedColor()
|
||||||
{
|
{
|
||||||
if (!Features.HasFlag(GamepadFeaturesFlag.Led)) return;
|
if (!HasConfiguration) return;
|
||||||
|
if (!_configuration.Led.EnableLed) return;
|
||||||
byte red = packedRgb > 0 ? (byte)(packedRgb >> 16) : (byte)0;
|
|
||||||
byte green = packedRgb > 0 ? (byte)(packedRgb >> 8) : (byte)0;
|
|
||||||
byte blue = packedRgb > 0 ? (byte)(packedRgb % 256) : (byte)0;
|
|
||||||
|
|
||||||
if (SDL_GameControllerSetLED(_gamepadHandle, red, green, blue) != 0)
|
uint _rawColor = _configuration.Led.LedColor;
|
||||||
Logger.Error?.Print(LogClass.Hid, "LED is not supported on this game controller.");
|
byte red = (byte)(_rawColor >> 16);
|
||||||
|
byte green = (byte)(_rawColor >> 8);
|
||||||
|
byte blue = (byte)(_rawColor % 256);
|
||||||
|
|
||||||
|
SDL_GameControllerSetLED(_gamepadHandle, red, green, blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private GamepadFeaturesFlag GetFeaturesFlag()
|
private GamepadFeaturesFlag GetFeaturesFlag()
|
||||||
@@ -126,7 +126,9 @@ namespace Ryujinx.Input.SDL2
|
|||||||
result |= GamepadFeaturesFlag.Motion;
|
result |= GamepadFeaturesFlag.Motion;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SDL_GameControllerHasRumble(_gamepadHandle) == SDL_bool.SDL_TRUE)
|
int error = SDL_GameControllerRumble(_gamepadHandle, 0, 0, 100);
|
||||||
|
|
||||||
|
if (error == 0)
|
||||||
{
|
{
|
||||||
result |= GamepadFeaturesFlag.Rumble;
|
result |= GamepadFeaturesFlag.Rumble;
|
||||||
}
|
}
|
||||||
@@ -148,8 +150,6 @@ namespace Ryujinx.Input.SDL2
|
|||||||
{
|
{
|
||||||
if (disposing && _gamepadHandle != nint.Zero)
|
if (disposing && _gamepadHandle != nint.Zero)
|
||||||
{
|
{
|
||||||
Rainbow.Updated -= RainbowColorChanged;
|
|
||||||
|
|
||||||
SDL_GameControllerClose(_gamepadHandle);
|
SDL_GameControllerClose(_gamepadHandle);
|
||||||
|
|
||||||
_gamepadHandle = nint.Zero;
|
_gamepadHandle = nint.Zero;
|
||||||
@@ -228,40 +228,14 @@ namespace Ryujinx.Input.SDL2
|
|||||||
|
|
||||||
private static Vector3 GsToMs2(Vector3 gs) => gs / SDL_STANDARD_GRAVITY;
|
private static Vector3 GsToMs2(Vector3 gs) => gs / SDL_STANDARD_GRAVITY;
|
||||||
|
|
||||||
private void RainbowColorChanged(int packedRgb)
|
|
||||||
{
|
|
||||||
if (!_configuration.Led.UseRainbow) return;
|
|
||||||
|
|
||||||
SetLed((uint)packedRgb);
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool _rainbowColorEnabled;
|
|
||||||
|
|
||||||
public void SetConfiguration(InputConfig configuration)
|
public void SetConfiguration(InputConfig configuration)
|
||||||
{
|
{
|
||||||
lock (_userMappingLock)
|
lock (_userMappingLock)
|
||||||
{
|
{
|
||||||
_configuration = (StandardControllerInputConfig)configuration;
|
_configuration = (StandardControllerInputConfig)configuration;
|
||||||
|
|
||||||
if (Features.HasFlag(GamepadFeaturesFlag.Led) && _configuration.Led.EnableLed)
|
if (Features.HasFlag(GamepadFeaturesFlag.Led))
|
||||||
{
|
SetLedColor();
|
||||||
if (_configuration.Led.TurnOffLed)
|
|
||||||
(this as IGamepad).ClearLed();
|
|
||||||
else switch (_configuration.Led.UseRainbow)
|
|
||||||
{
|
|
||||||
case true when !_rainbowColorEnabled:
|
|
||||||
Rainbow.Updated += RainbowColorChanged;
|
|
||||||
_rainbowColorEnabled = true;
|
|
||||||
break;
|
|
||||||
case false when _rainbowColorEnabled:
|
|
||||||
Rainbow.Updated -= RainbowColorChanged;
|
|
||||||
_rainbowColorEnabled = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_configuration.Led.TurnOffLed && !_rainbowColorEnabled)
|
|
||||||
SetLed(_configuration.Led.LedColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
_buttonsUserMapping.Clear();
|
_buttonsUserMapping.Clear();
|
||||||
|
|
||||||
|
|||||||
@@ -173,16 +173,5 @@ namespace Ryujinx.Input.SDL2
|
|||||||
|
|
||||||
return new SDL2Gamepad(gamepadHandle, id);
|
return new SDL2Gamepad(gamepadHandle, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IGamepad> GetGamepads()
|
|
||||||
{
|
|
||||||
lock (_gamepadsIds)
|
|
||||||
{
|
|
||||||
foreach (string gamepadId in _gamepadsIds)
|
|
||||||
{
|
|
||||||
yield return GetGamepad(gamepadId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Ryujinx.Common.Configuration.Hid;
|
using Ryujinx.Common.Configuration.Hid;
|
||||||
using Ryujinx.Common.Configuration.Hid.Keyboard;
|
using Ryujinx.Common.Configuration.Hid.Keyboard;
|
||||||
using Ryujinx.Common.Logging;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
@@ -386,11 +385,6 @@ namespace Ryujinx.Input.SDL2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLed(uint packedRgb)
|
|
||||||
{
|
|
||||||
Logger.Info?.Print(LogClass.UI, "SetLed called on an SDL2Keyboard");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTriggerThreshold(float triggerThreshold)
|
public void SetTriggerThreshold(float triggerThreshold)
|
||||||
{
|
{
|
||||||
// No operations
|
// No operations
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Ryujinx.Common.Configuration.Hid;
|
using Ryujinx.Common.Configuration.Hid;
|
||||||
using Ryujinx.Common.Logging;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
@@ -77,11 +76,6 @@ namespace Ryujinx.Input.SDL2
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLed(uint packedRgb)
|
|
||||||
{
|
|
||||||
Logger.Info?.Print(LogClass.UI, "SetLed called on an SDL2Mouse");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTriggerThreshold(float triggerThreshold)
|
public void SetTriggerThreshold(float triggerThreshold)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
@@ -165,8 +164,6 @@ namespace Ryujinx.Input.SDL2
|
|||||||
return new SDL2Mouse(this);
|
return new SDL2Mouse(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IGamepad> GetGamepads() => [GetGamepad("0")];
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
if (_isDisposed)
|
if (_isDisposed)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Ryujinx.SDL2.Common;
|
using Ryujinx.SDL2.Common;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Ryujinx.Input.SDL2
|
namespace Ryujinx.Input.SDL2
|
||||||
{
|
{
|
||||||
@@ -52,13 +51,5 @@ namespace Ryujinx.Input.SDL2
|
|||||||
|
|
||||||
return new SDL2Keyboard(this, _keyboardIdentifers[0], "All keyboards");
|
return new SDL2Keyboard(this, _keyboardIdentifers[0], "All keyboards");
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IGamepad> GetGamepads()
|
|
||||||
{
|
|
||||||
foreach (var keyboardId in _keyboardIdentifers)
|
|
||||||
{
|
|
||||||
yield return GetGamepad(keyboardId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,15 +65,6 @@ namespace Ryujinx.Input
|
|||||||
/// <param name="configuration">The configuration of the gamepad</param>
|
/// <param name="configuration">The configuration of the gamepad</param>
|
||||||
void SetConfiguration(InputConfig configuration);
|
void SetConfiguration(InputConfig configuration);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Set the LED on the gamepad to a given color.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Does nothing on a controller without LED functionality.</remarks>
|
|
||||||
/// <param name="packedRgb">The packed RGB integer.</param>
|
|
||||||
void SetLed(uint packedRgb);
|
|
||||||
|
|
||||||
public void ClearLed() => SetLed(0);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Starts a rumble effect on the gamepad.
|
/// Starts a rumble effect on the gamepad.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Ryujinx.Input
|
namespace Ryujinx.Input
|
||||||
{
|
{
|
||||||
@@ -34,11 +33,6 @@ namespace Ryujinx.Input
|
|||||||
/// <param name="id">The unique id of the gamepad</param>
|
/// <param name="id">The unique id of the gamepad</param>
|
||||||
/// <returns>An instance of <see cref="IGamepad"/> associated to the gamepad id given or null if not found</returns>
|
/// <returns>An instance of <see cref="IGamepad"/> associated to the gamepad id given or null if not found</returns>
|
||||||
IGamepad GetGamepad(string id);
|
IGamepad GetGamepad(string id);
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns an <see cref="IEnumerable{T}"/> of the connected gamepads.
|
|
||||||
/// </summary>
|
|
||||||
IEnumerable<IGamepad> GetGamepads();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clear the internal state of the driver.
|
/// Clear the internal state of the driver.
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Common.Utilities;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|||||||
@@ -501,8 +501,6 @@ namespace Ryujinx.Ava
|
|||||||
_renderingThread.Start();
|
_renderingThread.Start();
|
||||||
|
|
||||||
_viewModel.Volume = ConfigurationState.Instance.System.AudioVolume.Value;
|
_viewModel.Volume = ConfigurationState.Instance.System.AudioVolume.Value;
|
||||||
|
|
||||||
Rainbow.Enable();
|
|
||||||
|
|
||||||
MainLoop();
|
MainLoop();
|
||||||
|
|
||||||
@@ -589,15 +587,6 @@ namespace Ryujinx.Ava
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (IGamepad gamepad in RyujinxApp.MainWindow.InputManager.GamepadDriver.GetGamepads())
|
|
||||||
{
|
|
||||||
gamepad?.ClearLed();
|
|
||||||
gamepad?.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
Rainbow.Disable();
|
|
||||||
Rainbow.Reset();
|
|
||||||
|
|
||||||
_isStopped = true;
|
_isStopped = true;
|
||||||
Stop();
|
Stop();
|
||||||
}
|
}
|
||||||
@@ -1162,8 +1151,8 @@ namespace Ryujinx.Ava
|
|||||||
LocaleManager.Instance[LocaleKeys.VolumeShort] + $": {(int)(Device.GetVolume() * 100)}%",
|
LocaleManager.Instance[LocaleKeys.VolumeShort] + $": {(int)(Device.GetVolume() * 100)}%",
|
||||||
dockedMode,
|
dockedMode,
|
||||||
ConfigurationState.Instance.Graphics.AspectRatio.Value.ToText(),
|
ConfigurationState.Instance.Graphics.AspectRatio.Value.ToText(),
|
||||||
Device.Statistics.FormatGameFrameRate(),
|
$"{Device.Statistics.GetGameFrameRate():00.00} FPS ({Device.Statistics.GetGameFrameTime():00.00} ms)",
|
||||||
Device.Statistics.FormatFifoPercent(),
|
$"FIFO: {Device.Statistics.GetFifoPercent():00.00} %",
|
||||||
_displayCount));
|
_displayCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7628,57 +7628,7 @@
|
|||||||
"ar_SA": "",
|
"ar_SA": "",
|
||||||
"de_DE": "",
|
"de_DE": "",
|
||||||
"el_GR": "",
|
"el_GR": "",
|
||||||
"en_US": "LED",
|
"en_US": "Custom LED",
|
||||||
"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": "ControllerSettingsLedColorDisable",
|
|
||||||
"Translations": {
|
|
||||||
"ar_SA": "",
|
|
||||||
"de_DE": "",
|
|
||||||
"el_GR": "",
|
|
||||||
"en_US": "Disable",
|
|
||||||
"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": "ControllerSettingsLedColorRainbow",
|
|
||||||
"Translations": {
|
|
||||||
"ar_SA": "",
|
|
||||||
"de_DE": "",
|
|
||||||
"el_GR": "",
|
|
||||||
"en_US": "Rainbow",
|
|
||||||
"es_ES": "",
|
"es_ES": "",
|
||||||
"fr_FR": "",
|
"fr_FR": "",
|
||||||
"he_IL": "",
|
"he_IL": "",
|
||||||
@@ -23048,4 +22998,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using Ryujinx.Common.Configuration.Hid;
|
using Ryujinx.Common.Configuration.Hid;
|
||||||
using Ryujinx.Common.Configuration.Hid.Keyboard;
|
using Ryujinx.Common.Configuration.Hid.Keyboard;
|
||||||
using Ryujinx.Common.Logging;
|
|
||||||
using Ryujinx.Input;
|
using Ryujinx.Input;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -144,11 +143,6 @@ namespace Ryujinx.Ava.Input
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLed(uint packedRgb)
|
|
||||||
{
|
|
||||||
Logger.Info?.Print(LogClass.UI, "SetLed called on an AvaloniaKeyboard");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTriggerThreshold(float triggerThreshold) { }
|
public void SetTriggerThreshold(float triggerThreshold) { }
|
||||||
|
|
||||||
public void Rumble(float lowFrequency, float highFrequency, uint durationMs) { }
|
public void Rumble(float lowFrequency, float highFrequency, uint durationMs) { }
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ namespace Ryujinx.Ava.Input
|
|||||||
return new AvaloniaKeyboard(this, _keyboardIdentifers[0], LocaleManager.Instance[LocaleKeys.AllKeyboards]);
|
return new AvaloniaKeyboard(this, _keyboardIdentifers[0], LocaleManager.Instance[LocaleKeys.AllKeyboards]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IGamepad> GetGamepads() => [GetGamepad("0")];
|
|
||||||
|
|
||||||
protected virtual void Dispose(bool disposing)
|
protected virtual void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing)
|
if (disposing)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Ryujinx.Common.Configuration.Hid;
|
using Ryujinx.Common.Configuration.Hid;
|
||||||
using Ryujinx.Common.Logging;
|
|
||||||
using Ryujinx.Input;
|
using Ryujinx.Input;
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
@@ -75,11 +74,6 @@ namespace Ryujinx.Ava.Input
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLed(uint packedRgb)
|
|
||||||
{
|
|
||||||
Logger.Info?.Print(LogClass.UI, "SetLed called on an AvaloniaMouse");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTriggerThreshold(float triggerThreshold)
|
public void SetTriggerThreshold(float triggerThreshold)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using Avalonia.Controls;
|
|||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using Ryujinx.Input;
|
using Ryujinx.Input;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using MouseButton = Ryujinx.Input.MouseButton;
|
using MouseButton = Ryujinx.Input.MouseButton;
|
||||||
using Size = System.Drawing.Size;
|
using Size = System.Drawing.Size;
|
||||||
@@ -135,8 +134,6 @@ namespace Ryujinx.Ava.Input
|
|||||||
return new AvaloniaMouse(this);
|
return new AvaloniaMouse(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<IGamepad> GetGamepads() => [GetGamepad("0")];
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
if (_isDisposed)
|
if (_isDisposed)
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ namespace Ryujinx.Ava
|
|||||||
{
|
{
|
||||||
Version = ReleaseInformation.Version;
|
Version = ReleaseInformation.Version;
|
||||||
|
|
||||||
if (OperatingSystem.IsWindows() && !OperatingSystem.IsWindowsVersionAtLeast(10, 0, 19041))
|
if (OperatingSystem.IsWindows() && !OperatingSystem.IsWindowsVersionAtLeast(10, 0, 17134))
|
||||||
{
|
{
|
||||||
_ = MessageBoxA(nint.Zero, "You are running an outdated version of Windows.\n\nRyujinx supports Windows 10 version 20H1 and newer.\n", $"Ryujinx {Version}", MbIconwarning);
|
_ = MessageBoxA(nint.Zero, "You are running an outdated version of Windows.\n\nRyujinx supports Windows 10 version 1803 and newer.\n", $"Ryujinx {Version}", MbIconwarning);
|
||||||
}
|
}
|
||||||
|
|
||||||
PreviewerDetached = true;
|
PreviewerDetached = true;
|
||||||
|
|||||||
@@ -388,6 +388,30 @@ namespace Ryujinx.Ava.UI.Models.Input
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool _enableLedChanging;
|
||||||
|
|
||||||
|
public bool EnableLedChanging
|
||||||
|
{
|
||||||
|
get => _enableLedChanging;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_enableLedChanging = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color _ledColor;
|
||||||
|
|
||||||
|
public Color LedColor
|
||||||
|
{
|
||||||
|
get => _ledColor;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_ledColor = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private bool _enableMotion;
|
private bool _enableMotion;
|
||||||
public bool EnableMotion
|
public bool EnableMotion
|
||||||
{
|
{
|
||||||
@@ -409,58 +433,6 @@ namespace Ryujinx.Ava.UI.Models.Input
|
|||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool _enableLedChanging;
|
|
||||||
|
|
||||||
public bool EnableLedChanging
|
|
||||||
{
|
|
||||||
get => _enableLedChanging;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_enableLedChanging = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool ShowLedColorPicker => !TurnOffLed && !UseRainbowLed;
|
|
||||||
|
|
||||||
private bool _turnOffLed;
|
|
||||||
|
|
||||||
public bool TurnOffLed
|
|
||||||
{
|
|
||||||
get => _turnOffLed;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_turnOffLed = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
OnPropertyChanged(nameof(ShowLedColorPicker));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool _useRainbowLed;
|
|
||||||
|
|
||||||
public bool UseRainbowLed
|
|
||||||
{
|
|
||||||
get => _useRainbowLed;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_useRainbowLed = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
OnPropertyChanged(nameof(ShowLedColorPicker));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Color _ledColor;
|
|
||||||
|
|
||||||
public Color LedColor
|
|
||||||
{
|
|
||||||
get => _ledColor;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_ledColor = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public GamepadInputConfig(InputConfig config)
|
public GamepadInputConfig(InputConfig config)
|
||||||
{
|
{
|
||||||
@@ -540,8 +512,6 @@ namespace Ryujinx.Ava.UI.Models.Input
|
|||||||
if (controllerInput.Led != null)
|
if (controllerInput.Led != null)
|
||||||
{
|
{
|
||||||
EnableLedChanging = controllerInput.Led.EnableLed;
|
EnableLedChanging = controllerInput.Led.EnableLed;
|
||||||
TurnOffLed = controllerInput.Led.TurnOffLed;
|
|
||||||
UseRainbowLed = controllerInput.Led.UseRainbow;
|
|
||||||
uint rawColor = controllerInput.Led.LedColor;
|
uint rawColor = controllerInput.Led.LedColor;
|
||||||
byte alpha = (byte)(rawColor >> 24);
|
byte alpha = (byte)(rawColor >> 24);
|
||||||
byte red = (byte)(rawColor >> 16);
|
byte red = (byte)(rawColor >> 16);
|
||||||
@@ -609,8 +579,6 @@ namespace Ryujinx.Ava.UI.Models.Input
|
|||||||
Led = new LedConfigController
|
Led = new LedConfigController
|
||||||
{
|
{
|
||||||
EnableLed = EnableLedChanging,
|
EnableLed = EnableLedChanging,
|
||||||
TurnOffLed = this.TurnOffLed,
|
|
||||||
UseRainbow = UseRainbowLed,
|
|
||||||
LedColor = LedColor.ToUInt32()
|
LedColor = LedColor.ToUInt32()
|
||||||
},
|
},
|
||||||
Version = InputConfig.CurrentVersion,
|
Version = InputConfig.CurrentVersion,
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HttpResponseMessage response = await _httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, "https://raw.githubusercontent.com/Ryubing/Ryujinx/refs/heads/master/assets/amiibo/Amiibo.json"));
|
HttpResponseMessage response = await _httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, "https://raw.githubusercontent.com/GreemDev/Ryujinx/refs/heads/master/assets/amiibo/Amiibo.json"));
|
||||||
|
|
||||||
if (response.IsSuccessStatusCode)
|
if (response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
@@ -451,7 +451,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
HttpResponseMessage response = await _httpClient.GetAsync($"https://raw.githubusercontent.com/Ryubing/Ryujinx/refs/heads/master/assets/amiibo/Amiibo.json");
|
HttpResponseMessage response = await _httpClient.GetAsync($"https://raw.githubusercontent.com/GreemDev/Ryujinx/refs/heads/master/assets/amiibo/Amiibo.json");
|
||||||
|
|
||||||
if (response.IsSuccessStatusCode)
|
if (response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using Avalonia.Svg.Skia;
|
using Avalonia.Svg.Skia;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
|
||||||
using FluentAvalonia.UI.Controls;
|
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
|
||||||
using Ryujinx.Ava.UI.Models.Input;
|
using Ryujinx.Ava.UI.Models.Input;
|
||||||
using Ryujinx.Ava.UI.Views.Input;
|
using Ryujinx.Ava.UI.Views.Input;
|
||||||
|
|
||||||
@@ -60,16 +57,6 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
await RumbleInputView.Show(this);
|
await RumbleInputView.Show(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand LedDisabledChanged => Commands.Create(() =>
|
|
||||||
{
|
|
||||||
if (!Config.EnableLedChanging) return;
|
|
||||||
|
|
||||||
if (Config.TurnOffLed)
|
|
||||||
ParentModel.SelectedGamepad.ClearLed();
|
|
||||||
else
|
|
||||||
ParentModel.SelectedGamepad.SetLed(Config.LedColor.ToUInt32());
|
|
||||||
});
|
|
||||||
|
|
||||||
public void OnParentModelChanged()
|
public void OnParentModelChanged()
|
||||||
{
|
{
|
||||||
IsLeft = ParentModel.IsLeft;
|
IsLeft = ParentModel.IsLeft;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using Avalonia.Controls;
|
|||||||
using Avalonia.Svg.Skia;
|
using Avalonia.Svg.Skia;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using Gommon;
|
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.Input;
|
using Ryujinx.Ava.Input;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
@@ -55,18 +54,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
private static readonly InputConfigJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions());
|
private static readonly InputConfigJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions());
|
||||||
|
|
||||||
public IGamepadDriver AvaloniaKeyboardDriver { get; }
|
public IGamepadDriver AvaloniaKeyboardDriver { get; }
|
||||||
|
public IGamepad SelectedGamepad { get; private set; }
|
||||||
private IGamepad _selectedGamepad;
|
|
||||||
|
|
||||||
public IGamepad SelectedGamepad
|
|
||||||
{
|
|
||||||
get => _selectedGamepad;
|
|
||||||
private set
|
|
||||||
{
|
|
||||||
_selectedGamepad = value;
|
|
||||||
OnPropertiesChanged(nameof(HasLed), nameof(CanClearLed));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ObservableCollection<PlayerModel> PlayerIndexes { get; set; }
|
public ObservableCollection<PlayerModel> PlayerIndexes { get; set; }
|
||||||
public ObservableCollection<(DeviceType Type, string Id, string Name)> Devices { get; set; }
|
public ObservableCollection<(DeviceType Type, string Id, string Name)> Devices { get; set; }
|
||||||
@@ -81,8 +69,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
public bool IsRight { get; set; }
|
public bool IsRight { get; set; }
|
||||||
public bool IsLeft { get; set; }
|
public bool IsLeft { get; set; }
|
||||||
|
|
||||||
public bool HasLed => SelectedGamepad.Features.HasFlag(GamepadFeaturesFlag.Led);
|
public bool HasLed => false; //temporary
|
||||||
public bool CanClearLed => SelectedGamepad.Name.ContainsIgnoreCase("DualSense");
|
//SelectedGamepad.Features.HasFlag(GamepadFeaturesFlag.Led);
|
||||||
|
|
||||||
public bool IsModified { get; set; }
|
public bool IsModified { get; set; }
|
||||||
public event Action NotifyChangesEvent;
|
public event Action NotifyChangesEvent;
|
||||||
|
|||||||
@@ -429,7 +429,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
<!-- Motion, Rumble, LED -->
|
<!-- Motion + Rumble -->
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="0,10,0,0"
|
Margin="0,10,0,0"
|
||||||
Spacing="5"
|
Spacing="5"
|
||||||
@@ -495,47 +495,25 @@
|
|||||||
Margin="0,-1,0,0">
|
Margin="0,-1,0,0">
|
||||||
<Grid IsVisible="{Binding ParentModel.HasLed}">
|
<Grid IsVisible="{Binding ParentModel.HasLed}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
Margin="10, 10, 5, 10"
|
Margin="10"
|
||||||
MinWidth="0"
|
MinWidth="0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
IsChecked="{Binding Config.EnableLedChanging, Mode=TwoWay}">
|
IsChecked="{Binding Config.EnableLedChanging, Mode=TwoWay}">
|
||||||
<TextBlock Text="{ext:Locale ControllerSettingsLedColor}" />
|
<TextBlock Text="{ext:Locale ControllerSettingsLedColor}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox
|
|
||||||
Margin="5, 10, 5, 10"
|
|
||||||
MinWidth="0"
|
|
||||||
Grid.Column="1"
|
|
||||||
IsVisible="{Binding ParentModel.CanClearLed}"
|
|
||||||
IsChecked="{Binding Config.TurnOffLed, Mode=TwoWay}"
|
|
||||||
Command="{Binding LedDisabledChanged}">
|
|
||||||
<TextBlock Text="{ext:Locale ControllerSettingsLedColorDisable}" />
|
|
||||||
</CheckBox>
|
|
||||||
<CheckBox
|
|
||||||
Margin="5, 10 5,10"
|
|
||||||
MinWidth="0"
|
|
||||||
Grid.Column="2"
|
|
||||||
IsEnabled="{Binding !Config.TurnOffLed}"
|
|
||||||
IsChecked="{Binding Config.UseRainbowLed, Mode=TwoWay}">
|
|
||||||
<TextBlock Text="{ext:Locale ControllerSettingsLedColorRainbow}" />
|
|
||||||
</CheckBox>
|
|
||||||
<ui:ColorPickerButton
|
<ui:ColorPickerButton
|
||||||
Grid.Column="3"
|
Grid.Column="1"
|
||||||
IsEnabled="{Binding Config.ShowLedColorPicker}"
|
Margin="10"
|
||||||
Margin="5, 10, 10, 10"
|
|
||||||
IsMoreButtonVisible="False"
|
IsMoreButtonVisible="False"
|
||||||
UseColorPalette="False"
|
UseColorPalette="False"
|
||||||
UseColorTriangle="False"
|
UseColorTriangle="False"
|
||||||
UseColorWheel="False"
|
UseColorWheel="False"
|
||||||
ShowAcceptDismissButtons="False"
|
ShowAcceptDismissButtons="False"
|
||||||
IsAlphaEnabled="False"
|
IsAlphaEnabled="False"
|
||||||
AttachedToVisualTree="ColorPickerButton_OnAttachedToVisualTree"
|
|
||||||
ColorChanged="ColorPickerButton_OnColorChanged"
|
|
||||||
Color="{Binding Config.LedColor, Mode=TwoWay}">
|
Color="{Binding Config.LedColor, Mode=TwoWay}">
|
||||||
</ui:ColorPickerButton>
|
</ui:ColorPickerButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -4,14 +4,11 @@ using Avalonia.Controls.Primitives;
|
|||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.LogicalTree;
|
using Avalonia.LogicalTree;
|
||||||
using FluentAvalonia.UI.Controls;
|
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
using Ryujinx.Ava.UI.Models;
|
|
||||||
using Ryujinx.Ava.UI.ViewModels.Input;
|
using Ryujinx.Ava.UI.ViewModels.Input;
|
||||||
using Ryujinx.Common.Configuration.Hid.Controller;
|
using Ryujinx.Common.Configuration.Hid.Controller;
|
||||||
using Ryujinx.Input;
|
using Ryujinx.Input;
|
||||||
using Ryujinx.Input.Assigner;
|
using Ryujinx.Input.Assigner;
|
||||||
using System.Linq;
|
|
||||||
using StickInputId = Ryujinx.Common.Configuration.Hid.Controller.StickInputId;
|
using StickInputId = Ryujinx.Common.Configuration.Hid.Controller.StickInputId;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Views.Input
|
namespace Ryujinx.Ava.UI.Views.Input
|
||||||
@@ -85,7 +82,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
|
|
||||||
private void Button_IsCheckedChanged(object sender, RoutedEventArgs e)
|
private void Button_IsCheckedChanged(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is ToggleButton button)
|
if (sender is ToggleButton button)
|
||||||
{
|
{
|
||||||
if (button.IsChecked is true)
|
if (button.IsChecked is true)
|
||||||
{
|
{
|
||||||
@@ -106,9 +103,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
|
|
||||||
var viewModel = (DataContext as ControllerInputViewModel);
|
var viewModel = (DataContext as ControllerInputViewModel);
|
||||||
|
|
||||||
IKeyboard keyboard =
|
IKeyboard keyboard = (IKeyboard)viewModel.ParentModel.AvaloniaKeyboardDriver.GetGamepad("0"); // Open Avalonia keyboard for cancel operations.
|
||||||
(IKeyboard)viewModel.ParentModel.AvaloniaKeyboardDriver
|
|
||||||
.GetGamepad("0"); // Open Avalonia keyboard for cancel operations.
|
|
||||||
IButtonAssigner assigner = CreateButtonAssigner(isStick);
|
IButtonAssigner assigner = CreateButtonAssigner(isStick);
|
||||||
|
|
||||||
_currentAssigner.ButtonAssigned += (sender, e) =>
|
_currentAssigner.ButtonAssigned += (sender, e) =>
|
||||||
@@ -236,31 +231,8 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
|
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnDetachedFromVisualTree(e);
|
base.OnDetachedFromVisualTree(e);
|
||||||
|
|
||||||
foreach (IGamepad gamepad in RyujinxApp.MainWindow.InputManager.GamepadDriver.GetGamepads())
|
|
||||||
{
|
|
||||||
gamepad?.ClearLed();
|
|
||||||
}
|
|
||||||
|
|
||||||
_currentAssigner?.Cancel();
|
_currentAssigner?.Cancel();
|
||||||
_currentAssigner = null;
|
_currentAssigner = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ColorPickerButton_OnColorChanged(ColorPickerButton sender, ColorButtonColorChangedEventArgs args)
|
|
||||||
{
|
|
||||||
if (!args.NewColor.HasValue) return;
|
|
||||||
if (DataContext is not ControllerInputViewModel cVm) return;
|
|
||||||
if (!cVm.Config.EnableLedChanging) return;
|
|
||||||
|
|
||||||
cVm.ParentModel.SelectedGamepad.SetLed(args.NewColor.Value.ToUInt32());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ColorPickerButton_OnAttachedToVisualTree(object sender, VisualTreeAttachmentEventArgs e)
|
|
||||||
{
|
|
||||||
if (DataContext is not ControllerInputViewModel cVm) return;
|
|
||||||
if (!cVm.Config.EnableLedChanging) return;
|
|
||||||
|
|
||||||
cVm.ParentModel.SelectedGamepad.SetLed(cVm.Config.LedColor.ToUInt32());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,19 +264,19 @@
|
|||||||
Name="FaqMenuItem"
|
Name="FaqMenuItem"
|
||||||
Header="{ext:Locale MenuBarHelpFaq}"
|
Header="{ext:Locale MenuBarHelpFaq}"
|
||||||
Icon="{ext:Icon fa-github}"
|
Icon="{ext:Icon fa-github}"
|
||||||
CommandParameter="https://github.com/Ryubing/Ryujinx/wiki/FAQ-and-Troubleshooting"
|
CommandParameter="https://github.com/GreemDev/Ryujinx/wiki/FAQ-and-Troubleshooting"
|
||||||
ToolTip.Tip="{ext:Locale MenuBarHelpFaqTooltip}" />
|
ToolTip.Tip="{ext:Locale MenuBarHelpFaqTooltip}" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Name="SetupGuideMenuItem"
|
Name="SetupGuideMenuItem"
|
||||||
Header="{ext:Locale MenuBarHelpSetup}"
|
Header="{ext:Locale MenuBarHelpSetup}"
|
||||||
Icon="{ext:Icon fa-github}"
|
Icon="{ext:Icon fa-github}"
|
||||||
CommandParameter="https://github.com/Ryubing/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide"
|
CommandParameter="https://github.com/GreemDev/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide"
|
||||||
ToolTip.Tip="{ext:Locale MenuBarHelpSetupTooltip}" />
|
ToolTip.Tip="{ext:Locale MenuBarHelpSetupTooltip}" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Name="LdnGuideMenuItem"
|
Name="LdnGuideMenuItem"
|
||||||
Header="{ext:Locale MenuBarHelpMultiplayer}"
|
Header="{ext:Locale MenuBarHelpMultiplayer}"
|
||||||
Icon="{ext:Icon fa-github}"
|
Icon="{ext:Icon fa-github}"
|
||||||
CommandParameter="https://github.com/Ryubing/Ryujinx/wiki/Multiplayer%E2%80%90(LDN%E2%80%90Local%E2%80%90Wireless)%E2%80%90Guide"
|
CommandParameter="https://github.com/GreemDev/Ryujinx/wiki/Multiplayer%E2%80%90(LDN%E2%80%90Local%E2%80%90Wireless)%E2%80%90Guide"
|
||||||
ToolTip.Tip="{ext:Locale MenuBarHelpMultiplayerTooltip}" />
|
ToolTip.Tip="{ext:Locale MenuBarHelpMultiplayerTooltip}" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Click="Button_OnClick"
|
Click="Button_OnClick"
|
||||||
Tag="https://github.com/Ryubing/Ryujinx/graphs/contributors?type=a">
|
Tag="https://github.com/GreemDev/Ryujinx/graphs/contributors?type=a">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
FontSize="10"
|
FontSize="10"
|
||||||
Text="{ext:Locale AboutRyujinxContributorsButtonHeader}"
|
Text="{ext:Locale AboutRyujinxContributorsButtonHeader}"
|
||||||
|
|||||||
@@ -736,7 +736,9 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool _intelMacWarningShown = !RunningPlatform.IsIntelMac;
|
private static bool _intelMacWarningShown = !(OperatingSystem.IsMacOS() &&
|
||||||
|
(RuntimeInformation.OSArchitecture == Architecture.X64 ||
|
||||||
|
RuntimeInformation.OSArchitecture == Architecture.X86));
|
||||||
|
|
||||||
public static async Task ShowIntelMacWarningAsync()
|
public static async Task ShowIntelMacWarningAsync()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,14 +4,9 @@ using Avalonia.Input;
|
|||||||
using FluentAvalonia.Core;
|
using FluentAvalonia.Core;
|
||||||
using FluentAvalonia.UI.Controls;
|
using FluentAvalonia.UI.Controls;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.Models;
|
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using Ryujinx.Ava.UI.ViewModels.Input;
|
|
||||||
using Ryujinx.HLE.FileSystem;
|
using Ryujinx.HLE.FileSystem;
|
||||||
using Ryujinx.Input;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using Key = Avalonia.Input.Key;
|
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Windows
|
namespace Ryujinx.Ava.UI.Windows
|
||||||
{
|
{
|
||||||
@@ -111,12 +106,6 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
protected override void OnClosing(WindowClosingEventArgs e)
|
protected override void OnClosing(WindowClosingEventArgs e)
|
||||||
{
|
{
|
||||||
HotkeysPage.Dispose();
|
HotkeysPage.Dispose();
|
||||||
|
|
||||||
foreach (IGamepad gamepad in RyujinxApp.MainWindow.InputManager.GamepadDriver.GetGamepads())
|
|
||||||
{
|
|
||||||
gamepad?.ClearLed();
|
|
||||||
}
|
|
||||||
|
|
||||||
InputPage.Dispose();
|
InputPage.Dispose();
|
||||||
base.OnClosing(e);
|
base.OnClosing(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,8 +118,6 @@ namespace Ryujinx.Ava
|
|||||||
OpenHelper.OpenUrl(ReleaseInformation.GetChangelogForVersion(currentVersion));
|
OpenHelper.OpenUrl(ReleaseInformation.GetChangelogForVersion(currentVersion));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.Info?.Print(LogClass.Application, "Up to date.");
|
|
||||||
|
|
||||||
_running = false;
|
_running = false;
|
||||||
|
|
||||||
@@ -190,8 +188,6 @@ namespace Ryujinx.Ava
|
|||||||
OpenHelper.OpenUrl(ReleaseInformation.GetChangelogForVersion(currentVersion));
|
OpenHelper.OpenUrl(ReleaseInformation.GetChangelogForVersion(currentVersion));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.Info?.Print(LogClass.Application, "Up to date.");
|
|
||||||
|
|
||||||
_running = false;
|
_running = false;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using Avalonia.Media;
|
|
||||||
using Gommon;
|
using Gommon;
|
||||||
using Ryujinx.Ava.Utilities.Configuration.System;
|
using Ryujinx.Ava.Utilities.Configuration.System;
|
||||||
using Ryujinx.Ava.Utilities.Configuration.UI;
|
using Ryujinx.Ava.Utilities.Configuration.UI;
|
||||||
@@ -422,9 +421,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
config.Led = new LedConfigController
|
config.Led = new LedConfigController
|
||||||
{
|
{
|
||||||
EnableLed = false,
|
EnableLed = false,
|
||||||
TurnOffLed = false,
|
LedColor = 328189
|
||||||
UseRainbow = false,
|
|
||||||
LedColor = new Color(255, 5, 1, 253).ToUInt32()
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user