Compare commits
4 Commits
Canary-1.2
...
8a98905b2f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a98905b2f | ||
|
|
3b5f6170d1 | ||
|
|
9b6afa0ea2 | ||
|
|
a076410d02 |
@@ -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.0.2" />
|
<PackageVersion Include="Gommon" Version="2.7.1" />
|
||||||
<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" />
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ namespace Ryujinx.Common
|
|||||||
"0100b04011742000", // Monster Hunter Rise
|
"0100b04011742000", // Monster Hunter Rise
|
||||||
|
|
||||||
//Mario Franchise
|
//Mario Franchise
|
||||||
|
"010021d00812a000", // Arcade Archives VS. SUPER MARIO BROS.
|
||||||
"01006d0017f7a000", // Mario & Luigi: Brothership
|
"01006d0017f7a000", // Mario & Luigi: Brothership
|
||||||
"010003000e146000", // Mario & Sonic at the Olympic Games Tokyo 2020
|
"010003000e146000", // Mario & Sonic at the Olympic Games Tokyo 2020
|
||||||
"010067300059a000", // Mario + Rabbids: Kingdom Battle
|
"010067300059a000", // Mario + Rabbids: Kingdom Battle
|
||||||
@@ -212,32 +213,41 @@ namespace Ryujinx.Common
|
|||||||
//Misc Games
|
//Misc Games
|
||||||
"010056e00853a000", // A Hat in Time
|
"010056e00853a000", // A Hat in Time
|
||||||
"0100fd1014726000", // Baldurs Gate: Dark Alliance
|
"0100fd1014726000", // Baldurs Gate: Dark Alliance
|
||||||
|
"0100c6800b934000", // Brawlhalla
|
||||||
"0100dbf01000a000", // Burnout Paradise Remastered
|
"0100dbf01000a000", // Burnout Paradise Remastered
|
||||||
"0100744001588000", // Cars 3: Driven to Win
|
"0100744001588000", // Cars 3: Driven to Win
|
||||||
"0100b41013c82000", // Cruis'n Blast
|
"0100b41013c82000", // Cruis'n Blast
|
||||||
"010085900337e000", // Death Squared
|
"010085900337e000", // Death Squared
|
||||||
"01001b300b9be000", // Diablo III: Eternal Collection
|
"01001b300b9be000", // Diablo III: Eternal Collection
|
||||||
|
"010027400cdc6000", // Divinity Original 2 - Definitive Edition
|
||||||
"01008c8012920000", // Dying Light Platinum Edition
|
"01008c8012920000", // Dying Light Platinum Edition
|
||||||
"01001cc01b2d4000", // Goat Simulator 3
|
"01001cc01b2d4000", // Goat Simulator 3
|
||||||
"01003620068ea000", // Hand of Fate 2
|
"01003620068ea000", // Hand of Fate 2
|
||||||
"010085500130a000", // Lego City: Undercover
|
"010085500130a000", // Lego City: Undercover
|
||||||
"010073c01af34000", // LEGO Horizon Adventures
|
"010073c01af34000", // LEGO Horizon Adventures
|
||||||
|
"0100d71004694000", // Minecraft
|
||||||
|
"01007430037f6000", // Monopoly
|
||||||
"0100853015e86000", // No Man's Sky
|
"0100853015e86000", // No Man's Sky
|
||||||
"01007bb017812000", // Portal
|
"01007bb017812000", // Portal
|
||||||
"0100abd01785c000", // Portal 2
|
"0100abd01785c000", // Portal 2
|
||||||
"01008e200c5c2000", // Muse Dash
|
"01008e200c5c2000", // Muse Dash
|
||||||
"01007820196a6000", // Red Dead Redemption
|
"01007820196a6000", // Red Dead Redemption
|
||||||
|
"0100e8300a67a000", // Risk
|
||||||
"01002f7013224000", // Rune Factory 5
|
"01002f7013224000", // Rune Factory 5
|
||||||
"01008d100d43e000", // Saints Row IV
|
"01008d100d43e000", // Saints Row IV
|
||||||
"0100de600beee000", // Saints Row: The Third - The Full Package
|
"0100de600beee000", // Saints Row: The Third - The Full Package
|
||||||
"01001180021fa000", // Shovel Knight: Specter of Torment
|
"01001180021fa000", // Shovel Knight: Specter of Torment
|
||||||
|
"0100e65002bb8000", // Stardew Valley
|
||||||
"0100d7a01b7a2000", // Star Wars: Bounty Hunter
|
"0100d7a01b7a2000", // Star Wars: Bounty Hunter
|
||||||
"0100800015926000", // Suika Game
|
"0100800015926000", // Suika Game
|
||||||
|
"01007ad00013e000", // Super Bomberman R
|
||||||
"0100e46006708000", // Terraria
|
"0100e46006708000", // Terraria
|
||||||
|
"0100605008268000", // Titan Quest
|
||||||
"01000a10041ea000", // The Elder Scrolls V: Skyrim
|
"01000a10041ea000", // The Elder Scrolls V: Skyrim
|
||||||
"010057a01e4d4000", // TSUKIHIME -A piece of blue glass moon-
|
"010057a01e4d4000", // TSUKIHIME -A piece of blue glass moon-
|
||||||
"010080b00ad66000", // Undertale
|
"010080b00ad66000", // Undertale
|
||||||
"010069401adb8000", // Unicorn Overlord
|
"010069401adb8000", // Unicorn Overlord
|
||||||
|
"01005c600ac68000", // Valkyria Chronicles 4
|
||||||
"0100534009ff2000", // Yonder - The cloud catcher chronicles
|
"0100534009ff2000", // Yonder - The cloud catcher chronicles
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,40 +1,62 @@
|
|||||||
using System;
|
using Gommon;
|
||||||
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Ryujinx.Common.Utilities
|
namespace Ryujinx.Common.Utilities
|
||||||
{
|
{
|
||||||
public class Rainbow
|
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 float Speed { get; set; } = 1;
|
||||||
|
|
||||||
public static Color Color { get; private set; } = Color.Blue;
|
public static Color Color { get; private set; } = Color.Blue;
|
||||||
|
|
||||||
private static float _lastHue;
|
|
||||||
|
|
||||||
public static void Tick()
|
public static void Tick()
|
||||||
{
|
{
|
||||||
float currentHue = Color.GetHue();
|
Color = HsbToRgb((Color.GetHue() + Speed) / 360);
|
||||||
float nextHue = currentHue;
|
|
||||||
|
|
||||||
if (currentHue >= 360)
|
|
||||||
nextHue = 0;
|
|
||||||
else
|
|
||||||
nextHue += Speed;
|
|
||||||
|
|
||||||
Color = HsbToRgb(
|
UpdatedHandler.Call(Color.ToArgb());
|
||||||
nextHue / 360,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
);
|
|
||||||
|
|
||||||
_lastHue = currentHue;
|
|
||||||
|
|
||||||
RainbowColorUpdated?.Invoke(Color.ToArgb());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static event Action<int> RainbowColorUpdated;
|
public static void Reset()
|
||||||
|
{
|
||||||
|
Color = Color.Blue;
|
||||||
|
UpdatedHandler.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
private static Color HsbToRgb(float hue, float saturation, float brightness)
|
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;
|
int r = 0, g = 0, b = 0;
|
||||||
if (saturation == 0)
|
if (saturation == 0)
|
||||||
|
|||||||
@@ -148,6 +148,8 @@ 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;
|
||||||
@@ -232,6 +234,8 @@ namespace Ryujinx.Input.SDL2
|
|||||||
|
|
||||||
SetLed((uint)packedRgb);
|
SetLed((uint)packedRgb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool _rainbowColorEnabled;
|
||||||
|
|
||||||
public void SetConfiguration(InputConfig configuration)
|
public void SetConfiguration(InputConfig configuration)
|
||||||
{
|
{
|
||||||
@@ -243,13 +247,20 @@ namespace Ryujinx.Input.SDL2
|
|||||||
{
|
{
|
||||||
if (_configuration.Led.TurnOffLed)
|
if (_configuration.Led.TurnOffLed)
|
||||||
(this as IGamepad).ClearLed();
|
(this as IGamepad).ClearLed();
|
||||||
else if (_configuration.Led.UseRainbow)
|
else switch (_configuration.Led.UseRainbow)
|
||||||
Rainbow.RainbowColorUpdated += RainbowColorChanged;
|
{
|
||||||
else
|
case true when !_rainbowColorEnabled:
|
||||||
SetLed(_configuration.Led.LedColor);
|
Rainbow.Updated += RainbowColorChanged;
|
||||||
|
_rainbowColorEnabled = true;
|
||||||
|
break;
|
||||||
|
case false when _rainbowColorEnabled:
|
||||||
|
Rainbow.Updated -= RainbowColorChanged;
|
||||||
|
_rainbowColorEnabled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!_configuration.Led.UseRainbow)
|
if (!_configuration.Led.TurnOffLed && !_rainbowColorEnabled)
|
||||||
Rainbow.RainbowColorUpdated -= RainbowColorChanged;
|
SetLed(_configuration.Led.LedColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
_buttonsUserMapping.Clear();
|
_buttonsUserMapping.Clear();
|
||||||
|
|||||||
@@ -168,8 +168,6 @@ namespace Ryujinx.SDL2.Common
|
|||||||
HandleSDLEvent(ref evnt);
|
HandleSDLEvent(ref evnt);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Rainbow.Tick();
|
|
||||||
|
|
||||||
waitHandle.Wait(WaitTimeMs);
|
waitHandle.Wait(WaitTimeMs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -501,6 +501,8 @@ 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();
|
||||||
|
|
||||||
@@ -590,7 +592,11 @@ namespace Ryujinx.Ava
|
|||||||
foreach (IGamepad gamepad in RyujinxApp.MainWindow.InputManager.GamepadDriver.GetGamepads())
|
foreach (IGamepad gamepad in RyujinxApp.MainWindow.InputManager.GamepadDriver.GetGamepads())
|
||||||
{
|
{
|
||||||
gamepad?.ClearLed();
|
gamepad?.ClearLed();
|
||||||
|
gamepad?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rainbow.Disable();
|
||||||
|
Rainbow.Reset();
|
||||||
|
|
||||||
_isStopped = true;
|
_isStopped = true;
|
||||||
Stop();
|
Stop();
|
||||||
|
|||||||
@@ -118,6 +118,8 @@ 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;
|
||||||
|
|
||||||
@@ -188,6 +190,8 @@ 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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user