1
1
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2025-10-02 16:45:50 -05:00

6 Commits

Author SHA1 Message Date
TheToid
b4cac89c1f Fix some input controller issues (mapping sticks and duplicate controller names) (#31)
Co-authored-by: reggie <reggie@latte.to>
2024-10-08 21:41:31 -05:00
dependabot[bot]
0e5ce0bd20 nuget: bump Microsoft.IdentityModel.JsonWebTokens from 8.0.1 to 8.1.1 (#37)
Bumps [Microsoft.IdentityModel.JsonWebTokens](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) from 8.0.1 to 8.1.1.
- [Release notes](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases)
- [Changelog](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/compare/8.0.1...8.1.1)

---
updated-dependencies:
- dependency-name: Microsoft.IdentityModel.JsonWebTokens
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 09:03:28 -05:00
reggie
dc545c33e4 infra: Fix AppImage build for arm64 2024-10-06 14:42:31 -05:00
Samuel
51b956ac7f infra: don't repackage appimages and fix zsync files (#34)
Co-authored-by: reggie <reggie@latte.to>
2024-10-06 14:14:04 -05:00
reggie
2880892c2c meta: Update issue template's Discord link 2024-10-06 14:09:51 -05:00
reggie
9c5dda1848 infra: Add AppImage build to release workflow (Enjoy Steam Deck users 🙂) 2024-10-06 03:20:22 -05:00
7 changed files with 101 additions and 45 deletions

View File

@@ -1,5 +1,5 @@
blank_issues_enabled: true blank_issues_enabled: true
contact_links: contact_links:
- name: Latte Softworks Discord - name: ryujinx-mirror (Discord)
url: https://latte.to/discord url: https://discord.gg/xmHPGDfVCa
about: This is the home of development for the ryujinx-mirror fork, feel free to make a post in `#ryujinx-help` for general support & technical issues about: This is the home of development for the ryujinx-mirror fork, feel free to make a post in `#ryujinx-help` for general support & technical issues

View File

@@ -93,15 +93,19 @@ jobs:
wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x tools/appimagetool chmod +x tools/appimagetool
# Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
if [ "$PLATFORM_NAME" = "linux-x64" ]; then if [ "$PLATFORM_NAME" = "linux-x64" ]; then
ARCH_NAME=x64
export ARCH=x86_64 export ARCH=x86_64
elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
ARCH_NAME=arm64
export ARCH=aarch64 export ARCH=aarch64
else else
echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME"" echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
exit 1 exit 1
fi fi
export UFLAG="gh-releases-zsync|${{ github.repository_owner }}|${{ github.event.repository.name }}|latest|*-$ARCH_NAME.AppImage.zsync"
BUILDDIR=publish OUTDIR=publish_appimage distribution/linux/appimage/build-appimage.sh BUILDDIR=publish OUTDIR=publish_appimage distribution/linux/appimage/build-appimage.sh
shell: bash shell: bash

View File

@@ -106,20 +106,24 @@ jobs:
- name: Packing Windows builds - name: Packing Windows builds
if: matrix.platform.os == 'windows-latest' if: matrix.platform.os == 'windows-latest'
run: | run: |
BUILD_VERSION="${{ steps.version_info.outputs.build_version }}"
ZIP_OS_NAME="${{ matrix.platform.zip_os_name }}"
pushd publish_ava pushd publish_ava
cp Ryujinx.exe Ryujinx.Ava.exe cp Ryujinx.exe Ryujinx.Ava.exe
7z a ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip * 7z a ../release_output/ryujinx-$BUILD_VERSION-$ZIP_OS_NAME.zip *
7z a ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip * 7z a ../release_output/test-ava-ryujinx-$BUILD_VERSION-$ZIP_OS_NAME.zip *
popd popd
pushd publish_sdl2_headless pushd publish_sdl2_headless
7z a ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip * 7z a ../release_output/sdl2-ryujinx-headless-$BUILD_VERSION-$ZIP_OS_NAME.zip *
popd popd
shell: bash shell: bash
- name: Build AppImage (Linux) - name: Build AppImage (Linux)
if: matrix.platform.os == 'ubuntu-latest' if: matrix.platform.os == 'ubuntu-latest'
run: | run: |
BUILD_VERSION="${{ steps.version_info.outputs.build_version }}"
PLATFORM_NAME="${{ matrix.platform.name }}" PLATFORM_NAME="${{ matrix.platform.name }}"
sudo apt install -y zsync desktop-file-utils appstream sudo apt install -y zsync desktop-file-utils appstream
@@ -131,36 +135,44 @@ jobs:
wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x tools/appimagetool chmod +x tools/appimagetool
# Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
if [ "$PLATFORM_NAME" = "linux-x64" ]; then if [ "$PLATFORM_NAME" = "linux-x64" ]; then
ARCH_NAME=x64
export ARCH=x86_64 export ARCH=x86_64
elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
ARCH_NAME=arm64
export ARCH=aarch64 export ARCH=aarch64
else else
echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME"" echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
exit 1 exit 1
fi fi
export UFLAG="gh-releases-zsync|${{ github.repository_owner }}|${{ github.event.repository.name }}|latest|*-$ARCH_NAME.AppImage.zsync"
BUILDDIR=publish_ava OUTDIR=publish_ava_appimage distribution/linux/appimage/build-appimage.sh BUILDDIR=publish_ava OUTDIR=publish_ava_appimage distribution/linux/appimage/build-appimage.sh
# Add to release output
pushd publish_ava_appimage
mv Ryujinx.AppImage ../release_output/ryujinx-$BUILD_VERSION-$ARCH_NAME.AppImage
mv Ryujinx.AppImage.zsync ../release_output/ryujinx-$BUILD_VERSION-$ARCH_NAME.AppImage.zsync
popd
shell: bash shell: bash
- name: Packing Linux builds - name: Packing Linux builds
if: matrix.platform.os == 'ubuntu-latest' if: matrix.platform.os == 'ubuntu-latest'
run: | run: |
BUILD_VERSION="${{ steps.version_info.outputs.build_version }}"
ZIP_OS_NAME="${{ matrix.platform.zip_os_name }}"
pushd publish_ava pushd publish_ava
cp Ryujinx Ryujinx.Ava cp Ryujinx Ryujinx.Ava
chmod +x Ryujinx.sh Ryujinx Ryujinx.Ava chmod +x Ryujinx.sh Ryujinx Ryujinx.Ava
tar -czvf ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz * tar -czvf ../release_output/ryujinx-$BUILD_VERSION-$ZIP_OS_NAME.tar.gz *
tar -czvf ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz * tar -czvf ../release_output/test-ava-ryujinx-$BUILD_VERSION-$ZIP_OS_NAME.tar.gz *
popd popd
pushd publish_sdl2_headless pushd publish_sdl2_headless
chmod +x Ryujinx.sh Ryujinx.Headless.SDL2 chmod +x Ryujinx.sh Ryujinx.Headless.SDL2
tar -czvf ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz * tar -czvf ../release_output/sdl2-ryujinx-headless-$BUILD_VERSION-$ZIP_OS_NAME.tar.gz *
popd
# AppImage archive
pushd publish_ava_appimage
tar -czvf ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}-AppImage.tar.gz *
popd popd
shell: bash shell: bash
@@ -169,7 +181,7 @@ jobs:
with: with:
name: ${{ steps.version_info.outputs.build_version }} name: ${{ steps.version_info.outputs.build_version }}
tag: ${{ steps.version_info.outputs.build_version }} tag: ${{ steps.version_info.outputs.build_version }}
artifacts: "release_output/*.tar.gz,release_output/*.zip" artifacts: "release_output/*.tar.gz,release_output/*.zip,release_output/*AppImage*"
draft: "true" draft: "true"
omitBody: true omitBody: true
#omitBodyDuringUpdate: true #omitBodyDuringUpdate: true

View File

@@ -20,7 +20,7 @@
<PackageVersion Include="LibHac" Version="0.19.0" /> <PackageVersion Include="LibHac" Version="0.19.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" /> <PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" /> <PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.0.1" /> <PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.1.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" /> <PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageVersion Include="MsgPack.Cli" Version="1.0.1" /> <PackageVersion Include="MsgPack.Cli" Version="1.0.1" />

View File

@@ -1,16 +1,16 @@
#!/bin/sh #!/bin/sh
set -e set -eu
ROOTDIR="$(readlink -f "$(dirname "$0")")"/../../../ ROOTDIR="$(readlink -f "$(dirname "$0")")"/../../../
cd "$ROOTDIR" cd "$ROOTDIR"
BUILDDIR=${BUILDDIR:-publish} BUILDDIR=${BUILDDIR:-publish}
OUTDIR=${OUTDIR:-publish_appimage} OUTDIR=${OUTDIR:-publish_appimage}
UFLAG=${UFLAG:-"gh-releases-zsync|ryujinx-mirror|ryujinx|latest|*-x64.AppImage.zsync"}
rm -rf AppDir rm -rf AppDir
mkdir -p AppDir/usr/bin/bin mkdir -p AppDir/usr/bin
# Add symlinks for the AppImage
cp distribution/linux/Ryujinx.desktop AppDir/Ryujinx.desktop cp distribution/linux/Ryujinx.desktop AppDir/Ryujinx.desktop
cp distribution/linux/appimage/AppRun AppDir/AppRun cp distribution/linux/appimage/AppRun AppDir/AppRun
cp distribution/misc/Logo.svg AppDir/Ryujinx.svg cp distribution/misc/Logo.svg AppDir/Ryujinx.svg
@@ -23,8 +23,8 @@ chmod +x AppDir/AppRun AppDir/usr/bin/Ryujinx*
mkdir -p "$OUTDIR" mkdir -p "$OUTDIR"
appimagetool --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 21 \ appimagetool --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 21 \
-u "gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|Ryujinx|latest|*.AppImage.zsync" \ -u "$UFLAG" \
AppDir "$OUTDIR"/Ryujinx.AppImage AppDir "$OUTDIR"/Ryujinx.AppImage
# ?? # Move zsync file needed for delta updates
mv ./*.AppImage.zsync "$OUTDIR" mv ./*.AppImage.zsync "$OUTDIR"

View File

@@ -313,6 +313,32 @@ namespace Ryujinx.Input.SDL2
return value * ConvertRate; return value * ConvertRate;
} }
private JoyconConfigControllerStick<GamepadInputId, Common.Configuration.Hid.Controller.StickInputId> GetLogicalJoyStickConfig(StickInputId inputId)
{
switch (inputId)
{
case StickInputId.Left:
if (_configuration.RightJoyconStick.Joystick == Common.Configuration.Hid.Controller.StickInputId.Left)
{
return _configuration.RightJoyconStick;
}
else
{
return _configuration.LeftJoyconStick;
}
case StickInputId.Right:
if (_configuration.LeftJoyconStick.Joystick == Common.Configuration.Hid.Controller.StickInputId.Right)
{
return _configuration.LeftJoyconStick;
}
else
{
return _configuration.RightJoyconStick;
}
}
return null;
}
public (float, float) GetStick(StickInputId inputId) public (float, float) GetStick(StickInputId inputId)
{ {
if (inputId == StickInputId.Unbound) if (inputId == StickInputId.Unbound)
@@ -343,24 +369,26 @@ namespace Ryujinx.Input.SDL2
if (HasConfiguration) if (HasConfiguration)
{ {
if ((inputId == StickInputId.Left && _configuration.LeftJoyconStick.InvertStickX) || var joyconStickConfig = GetLogicalJoyStickConfig(inputId);
(inputId == StickInputId.Right && _configuration.RightJoyconStick.InvertStickX))
{
resultX = -resultX;
}
if ((inputId == StickInputId.Left && _configuration.LeftJoyconStick.InvertStickY) || if (joyconStickConfig != null)
(inputId == StickInputId.Right && _configuration.RightJoyconStick.InvertStickY))
{ {
resultY = -resultY; if (joyconStickConfig.InvertStickX)
} {
resultX = -resultX;
}
if ((inputId == StickInputId.Left && _configuration.LeftJoyconStick.Rotate90CW) || if (joyconStickConfig.InvertStickY)
(inputId == StickInputId.Right && _configuration.RightJoyconStick.Rotate90CW)) {
{ resultY = -resultY;
float temp = resultX; }
resultX = resultY;
resultY = -temp; if (joyconStickConfig.Rotate90CW)
{
float temp = resultX;
resultX = resultY;
resultY = -temp;
}
} }
} }

View File

@@ -45,7 +45,6 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
private PlayerIndex _playerId; private PlayerIndex _playerId;
private int _controller; private int _controller;
private int _controllerNumber;
private string _controllerImage; private string _controllerImage;
private int _device; private int _device;
private object _configViewModel; private object _configViewModel;
@@ -439,6 +438,24 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
public void LoadDevices() public void LoadDevices()
{ {
string GetGamepadName(IGamepad gamepad, int controllerNumber)
{
return $"{GetShortGamepadName(gamepad.Name)} ({controllerNumber})";
}
string GetUniqueGamepadName(IGamepad gamepad, ref int controllerNumber)
{
string name = GetGamepadName(gamepad, controllerNumber);
if (Devices.Any(controller => controller.Name == name))
{
controllerNumber++;
name = GetGamepadName(gamepad, controllerNumber);
}
return name;
}
lock (Devices) lock (Devices)
{ {
Devices.Clear(); Devices.Clear();
@@ -455,23 +472,18 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
} }
} }
int controllerNumber = 0;
foreach (string id in _mainWindow.InputManager.GamepadDriver.GamepadsIds) foreach (string id in _mainWindow.InputManager.GamepadDriver.GamepadsIds)
{ {
using IGamepad gamepad = _mainWindow.InputManager.GamepadDriver.GetGamepad(id); using IGamepad gamepad = _mainWindow.InputManager.GamepadDriver.GetGamepad(id);
if (gamepad != null) if (gamepad != null)
{ {
if (Devices.Any(controller => GetShortGamepadId(controller.Id) == GetShortGamepadId(gamepad.Id))) string name = GetUniqueGamepadName(gamepad, ref controllerNumber);
{ Devices.Add((DeviceType.Controller, id, name));
_controllerNumber++;
}
Devices.Add((DeviceType.Controller, id, $"{GetShortGamepadName(gamepad.Name)} ({_controllerNumber})"));
} }
} }
_controllerNumber = 0;
DeviceList.AddRange(Devices.Select(x => x.Name)); DeviceList.AddRange(Devices.Select(x => x.Name));
Device = Math.Min(Device, DeviceList.Count); Device = Math.Min(Device, DeviceList.Count);
} }
@@ -685,7 +697,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
if (!File.Exists(path)) if (!File.Exists(path))
{ {
var index = ProfilesList.IndexOf(ProfileName); int index = ProfilesList.IndexOf(ProfileName);
if (index != -1) if (index != -1)
{ {
ProfilesList.RemoveAt(index); ProfilesList.RemoveAt(index);