Compare commits

..

33 Commits

Author SHA1 Message Date
Evan Husted
76b8c79a4c Merge branch 'master' into Change-Controller-LED-Color 2025-01-24 13:42:44 -06:00
Evan Husted
5e8ba2c245 cleanup testing changes 2025-01-24 13:12:55 -06:00
Evan Husted
8b76295ee0 forgot to use the new locale key 2025-01-24 13:10:39 -06:00
Evan Husted
e8025e175d Rainbow LED 2025-01-24 13:03:10 -06:00
Evan Husted
8a22d9a942 tab 2025-01-23 22:58:08 -06:00
Evan Husted
344c1a5fef Clear LED on game close as well 2025-01-23 21:59:54 -06:00
Evan Husted
a6dfbe9ec2 Clear the LED on all controllers when settings window is closed and when input view is removed from the visual tree. 2025-01-23 21:39:19 -06:00
Evan Husted
5f02765130 Allow the ability to turn off the LED entirely
Only works for DualSense; in my testing, my DualShock 4 ignored the requests to set the LED to off.
2025-01-23 20:29:59 -06:00
Evan Husted
6619453aed Check if controller supports Rumble rather than trying to rumble for 100ms 2025-01-23 19:32:36 -06:00
Evan Husted
b442d32b7c directly compare result of rumble instead of storing an error int 2025-01-23 19:30:11 -06:00
Evan Husted
033f305872 log line to match other optional gamepad features 2025-01-23 19:28:26 -06:00
Evan Husted
bf869b0ee1 Properly save default 2025-01-23 19:18:29 -06:00
Evan Husted
72d5af8b46 Update LED as its changed in the UI 2025-01-23 19:02:35 -06:00
Evan Husted
cfe42563f2 Add the LED functionality to the base IGamepad interface 2025-01-23 18:33:52 -06:00
Evan Husted
5712e83a11 UI: enable LED changing 2025-01-23 17:22:25 -06:00
Evan Husted
8e642f0fe9 Merge branch 'master' into Change-Controller-LED-Color 2025-01-23 17:19:15 -06:00
Evan Husted
5276991517 Update SDL2Gamepad.cs 2025-01-22 22:37:03 -06:00
Evan Husted
898153ae13 Update SDL2Gamepad.cs 2025-01-22 22:35:09 -06:00
mika
96e9e3611d move logic around 2025-01-23 05:29:18 +01:00
mika
9aa834c268 maybe this works 2025-01-23 05:02:11 +01:00
mika
97dfeae99f test2 2025-01-23 04:24:01 +01:00
mika
740e35872d test 2025-01-23 03:40:45 +01:00
mika
2c4236f733 test 2025-01-23 03:39:33 +01:00
mika
e945565259 just testing if git works 2025-01-23 03:38:00 +01:00
mika
bdaaddb591 just testing if git is working 2025-01-23 03:38:00 +01:00
Otozinclus
488b09f974 Check if controller has a controllable LED 2025-01-23 03:38:00 +01:00
Evan Husted
f4c3a2e487 fix formatting & styling 2025-01-23 03:37:59 +01:00
Otozinclus
eff11f52a8 Change controller LED color
This changes the controller LED color. Now I need to add the option to change it in the settings
2025-01-23 03:37:59 +01:00
mika
c21aa86a7b just testing if git works 2025-01-23 00:09:07 +01:00
mika
861531f431 just testing if git is working 2025-01-23 00:06:24 +01:00
Otozinclus
6c0526c59f Check if controller has a controllable LED 2025-01-22 23:18:41 +01:00
Evan Husted
e861204078 fix formatting & styling 2025-01-22 16:04:57 -06:00
Otozinclus
8904397685 Change controller LED color
This changes the controller LED color. Now I need to add the option to change it in the settings
2025-01-22 21:55:53 +01:00
3 changed files with 3 additions and 28 deletions

View File

@@ -5,29 +5,17 @@ namespace Ryujinx.Common.Utilities
{
public class Rainbow
{
public static float Speed { get; set; } = 1;
public const float Speed = 1;
public static Color Color { get; private set; } = Color.Blue;
private static float _lastHue;
public static void Tick()
{
float currentHue = Color.GetHue();
float nextHue = currentHue;
if (currentHue >= 360)
nextHue = 0;
else
nextHue += Speed;
Color = HsbToRgb(
nextHue / 360,
(Color.GetHue() + Speed) / 360,
1,
1
);
_lastHue = currentHue;
RainbowColorUpdated?.Invoke(Color.ToArgb());
}

View File

@@ -226,13 +226,6 @@ namespace Ryujinx.Input.SDL2
private static Vector3 GsToMs2(Vector3 gs) => gs / SDL_STANDARD_GRAVITY;
private void RainbowColorChanged(int packedRgb)
{
if (!_configuration.Led.UseRainbow) return;
SetLed((uint)packedRgb);
}
public void SetConfiguration(InputConfig configuration)
{
lock (_userMappingLock)
@@ -244,12 +237,10 @@ namespace Ryujinx.Input.SDL2
if (_configuration.Led.TurnOffLed)
(this as IGamepad).ClearLed();
else if (_configuration.Led.UseRainbow)
Rainbow.RainbowColorUpdated += RainbowColorChanged;
Rainbow.RainbowColorUpdated += clr => SetLed((uint)clr);
else
SetLed(_configuration.Led.LedColor);
if (!_configuration.Led.UseRainbow)
Rainbow.RainbowColorUpdated -= RainbowColorChanged;
}
_buttonsUserMapping.Clear();

View File

@@ -118,8 +118,6 @@ namespace Ryujinx.Ava
OpenHelper.OpenUrl(ReleaseInformation.GetChangelogForVersion(currentVersion));
}
}
Logger.Info?.Print(LogClass.Application, "Up to date.");
_running = false;
@@ -190,8 +188,6 @@ namespace Ryujinx.Ava
OpenHelper.OpenUrl(ReleaseInformation.GetChangelogForVersion(currentVersion));
}
}
Logger.Info?.Print(LogClass.Application, "Up to date.");
_running = false;