mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-06-06 04:19:15 +00:00
Merge branch ryujinx:master into master
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -18,6 +18,8 @@ build/
|
|||||||
[Oo]bj/
|
[Oo]bj/
|
||||||
AppDir/
|
AppDir/
|
||||||
publish_appimage/
|
publish_appimage/
|
||||||
|
publish_ava/
|
||||||
|
publish_tmp_ava/
|
||||||
|
|
||||||
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
|
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
|
||||||
!packages/*/build/
|
!packages/*/build/
|
||||||
|
|||||||
BIN
distribution/macos/Assets.car
Normal file
BIN
distribution/macos/Assets.car
Normal file
Binary file not shown.
@@ -10,6 +10,8 @@
|
|||||||
<string>Ryujinx</string>
|
<string>Ryujinx</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>Ryujinx.icns</string>
|
<string>Ryujinx.icns</string>
|
||||||
|
<key>CFBundleIconName</key>
|
||||||
|
<string>Ryujinx</string>
|
||||||
<key>CFBundleDocumentTypes</key>
|
<key>CFBundleDocumentTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
@@ -40,7 +42,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.2</string>
|
<string>1.3</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ cp "$PUBLISH_DIRECTORY"/*.dylib "$APP_BUNDLE_DIRECTORY/Contents/Frameworks"
|
|||||||
cp Info.plist "$APP_BUNDLE_DIRECTORY/Contents"
|
cp Info.plist "$APP_BUNDLE_DIRECTORY/Contents"
|
||||||
cp Ryujinx.icns "$APP_BUNDLE_DIRECTORY/Contents/Resources/Ryujinx.icns"
|
cp Ryujinx.icns "$APP_BUNDLE_DIRECTORY/Contents/Resources/Ryujinx.icns"
|
||||||
cp updater.sh "$APP_BUNDLE_DIRECTORY/Contents/Resources/updater.sh"
|
cp updater.sh "$APP_BUNDLE_DIRECTORY/Contents/Resources/updater.sh"
|
||||||
|
cp Assets.car "$APP_BUNDLE_DIRECTORY/Contents/Resources/Assets.car"
|
||||||
cp -r "$PUBLISH_DIRECTORY/THIRDPARTY.md" "$APP_BUNDLE_DIRECTORY/Contents/Resources"
|
cp -r "$PUBLISH_DIRECTORY/THIRDPARTY.md" "$APP_BUNDLE_DIRECTORY/Contents/Resources"
|
||||||
|
|
||||||
echo -n "APPL????" > "$APP_BUNDLE_DIRECTORY/Contents/PkgInfo"
|
echo -n "APPL????" > "$APP_BUNDLE_DIRECTORY/Contents/PkgInfo"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace Ryujinx.Input.SDL3
|
|||||||
|
|
||||||
private StandardControllerInputConfig _configuration;
|
private StandardControllerInputConfig _configuration;
|
||||||
|
|
||||||
private static readonly SDL_GamepadButton[] _buttonsDriverMapping =
|
private readonly SDL_GamepadButton[] _buttonsDriverMapping =
|
||||||
[
|
[
|
||||||
// Unbound, ignored.
|
// Unbound, ignored.
|
||||||
SDL_GamepadButton.SDL_GAMEPAD_BUTTON_INVALID,
|
SDL_GamepadButton.SDL_GAMEPAD_BUTTON_INVALID,
|
||||||
@@ -88,6 +88,20 @@ namespace Ryujinx.Input.SDL3
|
|||||||
Features = GetFeaturesFlag();
|
Features = GetFeaturesFlag();
|
||||||
_triggerThreshold = 0.0f;
|
_triggerThreshold = 0.0f;
|
||||||
|
|
||||||
|
// Face button mapping
|
||||||
|
SDL_GamepadButton[] faceButtons = _buttonsDriverMapping[1..5];
|
||||||
|
foreach (SDL_GamepadButton btn in faceButtons) {
|
||||||
|
int mapId = SDL_GetGamepadButtonLabel(_gamepadHandle, btn) switch {
|
||||||
|
SDL_GamepadButtonLabel.SDL_GAMEPAD_BUTTON_LABEL_A or SDL_GamepadButtonLabel.SDL_GAMEPAD_BUTTON_LABEL_CROSS => 1,
|
||||||
|
SDL_GamepadButtonLabel.SDL_GAMEPAD_BUTTON_LABEL_B or SDL_GamepadButtonLabel.SDL_GAMEPAD_BUTTON_LABEL_CIRCLE => 2,
|
||||||
|
SDL_GamepadButtonLabel.SDL_GAMEPAD_BUTTON_LABEL_X or SDL_GamepadButtonLabel.SDL_GAMEPAD_BUTTON_LABEL_SQUARE => 3,
|
||||||
|
SDL_GamepadButtonLabel.SDL_GAMEPAD_BUTTON_LABEL_Y or SDL_GamepadButtonLabel.SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE => 4,
|
||||||
|
_ => -1
|
||||||
|
};
|
||||||
|
if (mapId == -1) { continue; }
|
||||||
|
_buttonsDriverMapping[mapId] = btn;
|
||||||
|
}
|
||||||
|
|
||||||
// Enable motion tracking
|
// Enable motion tracking
|
||||||
if ((Features & GamepadFeaturesFlag.Motion) != 0)
|
if ((Features & GamepadFeaturesFlag.Motion) != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ namespace Ryujinx.Input.SDL3
|
|||||||
|
|
||||||
string strGuid = new(guidBytes);
|
string strGuid = new(guidBytes);
|
||||||
|
|
||||||
return $"{strGuid[0..8]}-{strGuid[8..12]}-{strGuid[12..16]}-{strGuid[16..20]}-{strGuid[20..32]}";
|
return $"{strGuid[4..6]}{strGuid[6..8]}{strGuid[2..4]}{strGuid[0..2]}-{strGuid[10..12]}{strGuid[8..10]}-{strGuid[12..16]}-{strGuid[16..20]}-{strGuid[20..32]}";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user