fix(input): map POSIX stick endpoints exactly (#244)

This commit is contained in:
999sian
2026-07-16 14:19:33 +01:00
committed by GitHub
parent 2196a1f786
commit 26dbad8ac8
2 changed files with 21 additions and 2 deletions
@@ -0,0 +1,19 @@
// Copyright (C) 2026 SharpEmu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
using SharpEmu.Libs.Pad;
using Xunit;
namespace SharpEmu.Libs.Tests.Pad;
public sealed class HostWindowInputTests
{
[Theory]
[InlineData(-1.0f, 0)]
[InlineData(0.0f, 128)]
[InlineData(1.0f, 255)]
public void ToStickByteMapsFullSilkRange(float value, int expected)
{
Assert.Equal((byte)expected, HostWindowInput.ToStickByte(value));
}
}