mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-12-04 11:35:41 +00:00
Compare commits
4 commits
d43ad01ddb
...
d1b8b615e2
Author | SHA1 | Date | |
---|---|---|---|
d1b8b615e2 | |||
XargonWan | d37e6050d4 | ||
XargonWan | ffc55a6d2a | ||
fabf2cdfbb |
300
.github/workflows/build_release.yml
vendored
Normal file
300
.github/workflows/build_release.yml
vendored
Normal file
|
@ -0,0 +1,300 @@
|
|||
name: "Build RetroDECK"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- cooker*
|
||||
- feat*
|
||||
- branch/cooker*
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'automation_tools/**'
|
||||
- 'config/**'
|
||||
- 'functions/**'
|
||||
- 'rd-submodules/**'
|
||||
- '*.sh'
|
||||
- 'net.retrodeck.retrodeck.yml'
|
||||
- 'net.retrodeck.retrodeck.appdata.xml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- cooker*
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
|
||||
# Build RetroDECK Job
|
||||
Build_RetroDECK:
|
||||
runs-on: retrodeck
|
||||
outputs:
|
||||
TAG: ${{ steps.version-tag.outputs.TAG }}
|
||||
RELEASE_BODY: ${{ steps.version-tag.outputs.RELEASE_BODY }}
|
||||
MAKE_LATEST: ${{ steps.version-tag.outputs.MAKE_LATEST }}
|
||||
|
||||
steps:
|
||||
# Remove Stuck Mounts
|
||||
- name: Remove stuck mounts
|
||||
run: |
|
||||
sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/*
|
||||
sudo umount -f $HOME/actions-run/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/*
|
||||
continue-on-error: true
|
||||
|
||||
# Clone Repository
|
||||
- name: Clone RetroDECK repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
# Install Dependencies
|
||||
- name: Install dependencies
|
||||
run: curl "https://raw.githubusercontent.com/RetroDECK/components-template/main/automation_tools/install_dependencies.sh" | bash
|
||||
|
||||
# Generate Build ID for Cooker Branches
|
||||
- name: Generate cooker build ID
|
||||
if: github.ref != 'refs/heads/main'
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/cooker_build_id.sh"
|
||||
|
||||
# Getting branch name, this needs as PR should be managed in a different way
|
||||
- name: Get Branch Name
|
||||
run: |
|
||||
if [[ "$GITHUB_EVENT_NAME" == "pull_request" || "$GITHUB_EVENT_NAME" == "pull_request_target" ]]; then
|
||||
branch_name="$GITHUB_HEAD_REF"
|
||||
else
|
||||
branch_name="$GITHUB_REF_NAME"
|
||||
fi
|
||||
echo "Branch name: $branch_name"
|
||||
echo "BRANCH_NAME=$branch_name" >> $GITHUB_ENV
|
||||
|
||||
# Generates a version tag based on the event type (main branch, PR, or cooker) and sets it as output.
|
||||
- name: Generate Version Tag
|
||||
id: version-tag
|
||||
run: |
|
||||
# Source the version extractor script and fetch the manifest version
|
||||
source automation_tools/version_extractor.sh
|
||||
MANIFEST_VERSION="$(fetch_manifest_version)"
|
||||
|
||||
# Ensure the manifest version was successfully extracted
|
||||
if [[ -z "$MANIFEST_VERSION" ]]; then
|
||||
echo "[ERROR] Failed to extract the manifest version."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Determine the tag based on the GitHub event context
|
||||
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
|
||||
# Main branch tag
|
||||
TAG="$MANIFEST_VERSION"
|
||||
MAKE_LATEST=true
|
||||
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" || "$GITHUB_EVENT_NAME" == "pull_request_target" ]]; then
|
||||
# Pull request tag, sanitize the source branch
|
||||
source_branch="${GITHUB_HEAD_REF//\//-}"
|
||||
TAG="PR-$source_branch-${{ github.run_id }}"
|
||||
MAKE_LATEST=false
|
||||
else
|
||||
# Other branches (cooker branches)
|
||||
TAG="$MANIFEST_VERSION-${{ env.BUILD_ID }}"
|
||||
MAKE_LATEST=true
|
||||
fi
|
||||
|
||||
echo "TAG=$TAG" >> $GITHUB_ENV
|
||||
echo "MAKE_LATEST=$MAKE_LATEST" >> $GITHUB_ENV
|
||||
|
||||
echo "TAG=$TAG" >> $GITHUB_OUTPUT
|
||||
echo "MAKE_LATEST=$MAKE_LATEST" >> $GITHUB_OUTPUT
|
||||
|
||||
# backing up manifest in case download fails and hashes must be recalculated
|
||||
- name: Manifest backup
|
||||
run: "cp ${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml ${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml.bak"
|
||||
|
||||
- name: Run pre-build automation tasks
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"
|
||||
|
||||
- name: "Adding flatpak portal for automated updates (Cooker only)"
|
||||
if: github.ref != 'refs/heads/main'
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/cooker_flatpak_portal_add.sh"
|
||||
|
||||
- name: "Updating release notes in appdata"
|
||||
run: "automation_tools/appdata_management.sh"
|
||||
|
||||
- name: "[DEBUG] Outputting manifest"
|
||||
run: cat net.retrodeck.retrodeck.yml
|
||||
|
||||
# Get Commits Since Last Published Release (Cooker only)
|
||||
- name: Get commits since last published release
|
||||
id: get-commits
|
||||
if: github.ref != 'refs/heads/main'
|
||||
run: |
|
||||
# Get the latest published release tag
|
||||
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "")
|
||||
|
||||
if [ -z "$LATEST_TAG" ]; then
|
||||
echo "[INFO] No previous release found. Using all commits."
|
||||
COMMITS=$(git log HEAD --pretty=format:"- %s")
|
||||
else
|
||||
echo "[INFO] Latest published release tag: $LATEST_TAG"
|
||||
COMMITS=$(git log ${LATEST_TAG}..HEAD --pretty=format:"- %s")
|
||||
fi
|
||||
|
||||
# Debug: Print the commits list
|
||||
echo "Commits since $LATEST_TAG:"
|
||||
echo "$COMMITS"
|
||||
|
||||
# Export the commits list to the GitHub environment
|
||||
echo "COMMITS=$COMMITS" >> $GITHUB_ENV
|
||||
|
||||
# - name: Extract XML Description
|
||||
# uses: Mudlet/xmlstarlet-action@master
|
||||
# id: extract-description
|
||||
# with:
|
||||
# args: sel -t -v "/component/releases/release[1]/description//text()" ./net.retrodeck.retrodeck.appdata.xml
|
||||
|
||||
# Generate Release Body
|
||||
- name: Generate release body text
|
||||
id: generate-body
|
||||
run: |
|
||||
# Initialize the release body text
|
||||
RELEASE_BODY="# Release Notes\n"
|
||||
RELEASE_BODY+="This is a cooker snapshot based on the commit: ${{ github.event.repository.full_name }}@${{github.sha}}."
|
||||
RELEASE_BODY+="On branch [${{env.BRANCH_NAME}}](https://repo.retrodeck.net/RetroDECK/RetroDECK/src/branch/${{env.BRANCH_NAME}})."
|
||||
RELEASE_BODY+="## Commits since last release\n"
|
||||
RELEASE_BODY+="$COMMITS\n\n"
|
||||
|
||||
#raw_description="${{ steps.extract-description.outputs.result }}"
|
||||
|
||||
# Convert <p> tags to markdown headers using sed
|
||||
markdown_description=$(echo "$raw_description" | sed -e 's|<p>|\n### |g' -e 's|</p>||g')
|
||||
|
||||
# Convert <li> tags to bullet points and trim spaces
|
||||
markdown_description=$(echo "$markdown_description" | sed -e 's|<ul>||g' -e 's|</ul>||g' -e 's|<li>|- |g' -e 's|</li>||g' | awk '{$1=$1;print}')
|
||||
|
||||
# Remove any remaining XML tags
|
||||
markdown_description=$(echo "$markdown_description" | sed -e 's/<[^>]*>//g')
|
||||
|
||||
# Debug: Print the markdown description
|
||||
echo "Markdown Description:"
|
||||
echo "$markdown_description"
|
||||
|
||||
# Append markdown content to the release body
|
||||
RELEASE_BODY+="$markdown_description"
|
||||
printf "RELEASE_BODY=%s\n" "$RELEASE_BODY" >> $GITHUB_ENV
|
||||
printf "RELEASE_BODY=%s\n" "$RELEASE_BODY" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "[DEBUG] CHECKPOINT 8"
|
||||
|
||||
- name: "Build flatpak: download only"
|
||||
id: flatpak-download
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
|
||||
|
||||
# Sometimes flatpak download fails, in this case it tries a second time
|
||||
- name: "Build flatpak: download only (retry)"
|
||||
if: steps.flatpak-download.outcome == 'failure'
|
||||
run: |
|
||||
echo "Download failed, maybe some hash changed since the build start."
|
||||
echo "Recalculating hashes and retrying download..."
|
||||
rm -f "{GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml"
|
||||
cp "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml.bak" "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml"
|
||||
"${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"
|
||||
"${GITHUB_WORKSPACE}/automation_tools/flatpak_build_download_only.sh"
|
||||
|
||||
- name: Build flatpak
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_only.sh"
|
||||
|
||||
- name: Create Bundle
|
||||
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/flatpak_build_bundle.sh"
|
||||
|
||||
# Upload artifacts for other jobs
|
||||
- name: Upload Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: retrodeck-artifacts
|
||||
include-hidden-files: true
|
||||
path: |
|
||||
RetroDECK*.flatpak
|
||||
RetroDECK*.flatpak.sha
|
||||
RetroDECK*Artifact.tar.gz
|
||||
|
||||
GitHub-publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: Build_RetroDECK
|
||||
env:
|
||||
TAG: ${{ needs.Build_RetroDECK.outputs.TAG }}
|
||||
RELEASE_BODY: ${{ needs.Build_RetroDECK.outputs.RELEASE_BODY }}
|
||||
MAKE_LATEST: ${{ needs.Build_RetroDECK.outputs.MAKE_LATEST }}
|
||||
steps:
|
||||
|
||||
- name: Generate a token for Rekku
|
||||
id: generate-rekku-token
|
||||
uses: actions/create-github-app-token@v1
|
||||
with:
|
||||
app-id: ${{ vars.REKKU_APP_ID }}
|
||||
private-key: ${{ secrets.REKKU_PRIVATE_KEY }}
|
||||
repositories: "RetroDECK,Cooker"
|
||||
owner: "RetroDECK"
|
||||
|
||||
- name: Download all workflow run artifacts
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
|
||||
# Determine if Target Repository is Main or not, in that case is a Cooker build
|
||||
- name: Determine target repository
|
||||
id: set-repo
|
||||
run: |
|
||||
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
|
||||
echo "REPO_NAME=RetroDECK" >> $GITHUB_ENV
|
||||
else
|
||||
echo "REPO_NAME=Cooker" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
# Publish Release
|
||||
- name: Publish release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: ${{ env.TAG }}
|
||||
name: "RetroDECK ${{ env.TAG }}"
|
||||
body: ${{ env.RELEASE_BODY }}
|
||||
artifacts: "retrodeck-artifacts/*.flatpak,retrodeck-artifacts/*.flatpak.sha,retrodeck-artifacts/*Artifact.tar.gz"
|
||||
allowUpdates: true
|
||||
makeLatest: ${{ env.MAKE_LATEST }}
|
||||
repo: ${{ env.REPO_NAME }}
|
||||
token: ${{ steps.generate-rekku-token.outputs.token }}
|
||||
|
||||
# Rewrite Tag (for Main Branch Only)
|
||||
- name: Rewrite Tag
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
git submodule deinit -f --all
|
||||
git fetch --tags
|
||||
if git rev-parse --verify "${{ env.TAG }}" >/dev/null 2>&1; then
|
||||
git tag -d "${{ env.TAG }}"
|
||||
git push --delete origin "${{ env.TAG }}"
|
||||
fi
|
||||
git tag "${{ env.TAG }}"
|
||||
git push origin "${{ env.TAG }}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate-rekku-token.outputs.token }}
|
||||
|
||||
# As backup we're even publishing the build on our own selfhosted Fogejo instance
|
||||
# Forgejo Publish Job if main branch
|
||||
# Forgejo-publish:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: Build_RetroDECK
|
||||
# env:
|
||||
# TAG: ${{ needs.Build_RetroDECK.outputs.TAG }}
|
||||
# RELEASE_BODY: ${{ needs.Build_RetroDECK.outputs.RELEASE_BODY }}
|
||||
# MAKE_LATEST: ${{ needs.Build_RetroDECK.outputs.MAKE_LATEST }}
|
||||
# steps:
|
||||
#
|
||||
# - name: Download all workflow run artifacts
|
||||
# uses: actions/download-artifact@v4.1.8
|
||||
#
|
||||
# - name: Forgejo-publish
|
||||
# if: github.ref == 'refs/heads/main'
|
||||
# uses: RetroDECK/components-template/.github/workflows/fogejo_publish_release.yml@main
|
||||
# with:
|
||||
# release_body: ${{ env.RELEASE_BODY }}
|
||||
# artifacts: "retrodeck-artifacts/*.flatpak,retrodeck-artifacts/*.flatpak.sha,retrodeck-artifacts/*Artifact.tar.gz"
|
||||
# tag: ${{ env.TAG }}
|
||||
|
109
emu-configs/defaults/retrodeck/retrodeck-mimetype.xml
Normal file
109
emu-configs/defaults/retrodeck/retrodeck-mimetype.xml
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/retro-game">
|
||||
<comment>Retro Game</comment>
|
||||
<glob pattern="*.2d"/>
|
||||
<glob pattern="*.2hd"/>
|
||||
<glob pattern="*.2mg"/>
|
||||
<glob pattern="*.32x"/>
|
||||
<glob pattern="*.360"/>
|
||||
<glob pattern="*.3ds"/>
|
||||
<glob pattern="*.3dsen"/>
|
||||
<glob pattern="*.3dsx"/>
|
||||
<glob pattern="*.68k"/>
|
||||
<glob pattern="*.7z"/>
|
||||
<glob pattern="*.88d"/>
|
||||
<glob pattern="*.98d"/>
|
||||
<glob pattern="*.a26"/>
|
||||
<glob pattern="*.a52"/>
|
||||
<glob pattern="*.a78"/>
|
||||
<glob pattern="*.abs"/>
|
||||
<glob pattern="*.adf"/>
|
||||
<glob pattern="*.adl"/>
|
||||
<glob pattern="*.adm"/>
|
||||
<glob pattern="*.ads"/>
|
||||
<glob pattern="*.adz"/>
|
||||
<glob pattern="*.agb"/>
|
||||
<glob pattern="*.apd"/>
|
||||
<glob pattern="*.app"/>
|
||||
<glob pattern="*.arduboy"/>
|
||||
<glob pattern="*.atr"/>
|
||||
<glob pattern="*.atx"/>
|
||||
<glob pattern="*.axf"/>
|
||||
<glob pattern="*.bat"/>
|
||||
<glob pattern="*.bbc"/>
|
||||
<glob pattern="*.bin"/>
|
||||
<glob pattern="*.bml"/>
|
||||
<glob pattern="*.bms"/>
|
||||
<glob pattern="*.bs"/>
|
||||
<glob pattern="*.bsx"/>
|
||||
<glob pattern="*.car"/>
|
||||
<glob pattern="*.cas"/>
|
||||
<glob pattern="*.cbn"/>
|
||||
<glob pattern="*.ccd"/>
|
||||
<glob pattern="*.cci"/>
|
||||
<glob pattern="*.cdi"/>
|
||||
<glob pattern="*.cdm"/>
|
||||
<glob pattern="*.cdr"/>
|
||||
<glob pattern="*.cdt"/>
|
||||
<glob pattern="*.cgb"/>
|
||||
<glob pattern="*.chai"/>
|
||||
<glob pattern="*.chailove"/>
|
||||
<glob pattern="*.chd"/>
|
||||
<glob pattern="*.chf"/>
|
||||
<glob pattern="*.ciso"/>
|
||||
<glob pattern="*.cmd"/>
|
||||
<glob pattern="*.cmt"/>
|
||||
<glob pattern="*.cof"/>
|
||||
<glob pattern="*.col"/>
|
||||
<glob pattern="*.com"/>
|
||||
<glob pattern="*.conf"/>
|
||||
<glob pattern="*.cpr"/>
|
||||
<glob pattern="*.cqi"/>
|
||||
<glob pattern="*.cqm"/>
|
||||
<glob pattern="*.crt"/>
|
||||
<glob pattern="*.cso"/>
|
||||
<glob pattern="*.csw"/>
|
||||
<glob pattern="*.cue"/>
|
||||
<glob pattern="*.cv"/>
|
||||
<glob pattern="*.cxi"/>
|
||||
<glob pattern="*.d2m"/>
|
||||
<glob pattern="*.d4m"/>
|
||||
<glob pattern="*.d64"/>
|
||||
<glob pattern="*.d6z"/>
|
||||
<glob pattern="*.d71"/>
|
||||
<glob pattern="*.d77"/>
|
||||
<glob pattern="*.d7z"/>
|
||||
<glob pattern="*.d80"/>
|
||||
<glob pattern="*.d81"/>
|
||||
<glob pattern="*.d82"/>
|
||||
<glob pattern="*.d88"/>
|
||||
<glob pattern="*.d8z"/>
|
||||
<glob pattern="*.d98"/>
|
||||
<glob pattern="*.dat"/>
|
||||
<glob pattern="*.ddp"/>
|
||||
<glob pattern="*.dfi"/>
|
||||
<glob pattern="*.dim"/>
|
||||
<glob pattern="*.dms"/>
|
||||
<glob pattern="*.do"/>
|
||||
<glob pattern="*.dol"/>
|
||||
<glob pattern="*.dosz"/>
|
||||
<glob pattern="*.dsk"/>
|
||||
<glob pattern="*.dump"/>
|
||||
<glob pattern="*.dx1"/>
|
||||
<glob pattern="*.ecm"/>
|
||||
<glob pattern="*.elf"/>
|
||||
<glob pattern="*.exe"/>
|
||||
<glob pattern="*.fdi"/>
|
||||
<glob pattern="*.fds"/>
|
||||
<glob pattern="*.gdi"/>
|
||||
<glob pattern="*.img"/>
|
||||
<glob pattern="*.iso"/>
|
||||
<glob pattern="*.lha"/>
|
||||
<glob pattern="*.m3u"/>
|
||||
<glob pattern="*.nes"/>
|
||||
<glob pattern="*.rom"/>
|
||||
<glob pattern="*.smd"/>
|
||||
<glob pattern="*.zip"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
12
net.retrodeck.retrodeck.start.desktop
Normal file
12
net.retrodeck.retrodeck.start.desktop
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Desktop Entry]
|
||||
Name=Play with RetroDECK
|
||||
GenericName=Play with RetroDECK
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
Comment=Launch a game with RetroDeck
|
||||
Icon=net.retrodeck.retrodeck
|
||||
Exec=flatpak run net.retrodeck.retrodeck start %f
|
||||
Terminal=false
|
||||
MimeType=application/retro-game;
|
||||
X-Flatpak=net.retrodeck.retrodeck
|
||||
|
|
@ -923,6 +923,8 @@ modules:
|
|||
# has leftover files from a previous non-flatpak install
|
||||
- type: patch
|
||||
path: rd-submodules/primehack/detectflatpak.patch
|
||||
- type: patch
|
||||
path: Steam-Deck-Control-Fix.patch
|
||||
# version strings must match exactly for online multiplayer
|
||||
- type: patch
|
||||
path: rd-submodules/primehack/nodirtyversion.patch
|
||||
|
|
37
rd-submodules/primehack/Steam-Deck-Control-Fix.patch
Normal file
37
rd-submodules/primehack/Steam-Deck-Control-Fix.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
From ed3bf410c016ac9f84e7362101f1d831f16dc430 Mon Sep 17 00:00:00 2001
|
||||
From: Vicki Pfau <vi@endrift.com>
|
||||
Date: Tue, 9 Jan 2024 20:49:38 -0800
|
||||
Subject: [PATCH] Steam Deck: Pad out feature report to 64 bytes
|
||||
|
||||
Also update the names of the setting post-Steam Deck commits to SDL
|
||||
|
||||
Fixes https://bugs.dolphin-emu.org/issues/13412
|
||||
---
|
||||
.../ControllerInterface/SteamDeck/SteamDeck.cpp | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp b/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp
|
||||
index 0a0dc88387..87504f77b8 100644
|
||||
--- a/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp
|
||||
+++ b/Source/Core/InputCommon/ControllerInterface/SteamDeck/SteamDeck.cpp
|
||||
@@ -288,14 +288,13 @@ void Device::UpdateInput()
|
||||
if (++m_gyro_reenable == 250)
|
||||
{
|
||||
m_gyro_reenable = 0;
|
||||
- // Using names from Valve's contribution to SDL for the Steam Controller
|
||||
- // (and assuming this has not changed for the Deck), this packet decodes as:
|
||||
+ // Using names from Valve's contribution to SDL this packet decodes as:
|
||||
// 0x00 = report ID
|
||||
// 0x87 = ID_SET_SETTINGS_VALUES
|
||||
// 0x03 = payload length
|
||||
- // 0x30 = SETTING_GYRO_MODE
|
||||
+ // 0x30 = SETTING_IMU_MODE
|
||||
// 0x18 0x00 = SETTING_GYRO_MODE_SEND_RAW_ACCEL | SETTING_GYRO_MODE_SEND_RAW_GYRO
|
||||
- const unsigned char pkt[] = {0x00, 0x87, 0x03, 0x30, 0x18, 0x00};
|
||||
+ const unsigned char pkt[65] = {0x00, 0x87, 0x03, 0x30, 0x18, 0x00};
|
||||
hid_send_feature_report(m_device, pkt, sizeof(pkt));
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
Loading…
Reference in a new issue