Support SFMA 'axes' array format + fix ODR violation#3
Open
IntiSim wants to merge 2 commits into
Open
Conversation
XTPlayer's internal format uses a "channels" JSON key for multi-axis
funscripts, but the wider ecosystem uses an "axes" array of {id, actions}
objects. This adds parsing for both formats in funscript loading,
library metadata detection, and SFMA status checks.
Also fixes a copy-paste bug where isSFMA change detection compared
against isMFS, and resets isSFMA before discovery to handle removal.
…tion GCC 14 with -mno-direct-extern-access can cause static inline variables to have different instances across shared library boundaries. This made mediaLibrarySettings appear null in the XTPlayer executable even after being set by libxtengine.so, causing crashes at startup and when closing the welcome dialog. Changed from static inline (header-only, C++17) to a traditional static declaration in the header with a single out-of-class definition in settingshandler.cpp, so the symbol lives in exactly one place in libxtengine.so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes for building and running on modern GCC (14.x) with Qt 6.11:
1. Support "axes" array format for SFMA multi-axis funscripts
XTPlayer's internal format uses a
"channels"JSON key for multi-axis funscripts, but the wider ecosystem uses an"axes"array of{id, actions}objects. This adds parsing for both formats in:jsonToFunscript()— script loadinggetSFMATracks()— metadata detectionisSFMA()— status checksAlso fixes a copy-paste bug where
isSFMAchange detection compared againstisMFS, and resetsisSFMAto false before discovery to handle script removal.2. Fix ODR violation with
mediaLibrarySettingsGCC 14 with
-mno-direct-extern-accesscausesstatic inlinevariables to have different instances across shared library boundaries. This mademediaLibrarySettingsappear null in the XTPlayer executable even after being set bylibxtengine.so, causing crashes at startup and when closing the welcome dialog.Changed from
static inline(header-only, C++17) to a traditionalstaticdeclaration in the header with a single out-of-class definition insettingshandler.cpp.Test plan
"axes"array format and verify it's detected as SFMA"channels"format and verify it still works