sync: TheSuperHackers upstream (5 commits, 06-04-2026)#154
Closed
fbraz3 wants to merge 6 commits into
Closed
Conversation
…nDestroy() when Reinforcement Pad is destroyed before Troop Crawler drop (TheSuperHackers#2747)
…) into smaller functions (TheSuperHackers#2758)
Upstream: TheSuperHackers/main @ 7c78a5e Ancestor: 20f4254 (previous sync) Divergence: 5 commits upstream / 1813 ours (small sync) PRs brought in: - TheSuperHackers#2710 fix(memory): Fix various memory leaks (2) - TheSuperHackers#2747 bugfix(object): Avoid crash with dangling contain module (Object::onDestroy) - TheSuperHackers#2718 fix/refactor(milesaudiomanager): Prevent multithread crashing + simplify - TheSuperHackers#2577 fix(metaevent): Ignore order in which modifier keys are released - TheSuperHackers#2758 refactor(metaevent): Split MetaEventTranslator::translateGameMessage() Conflict resolution (this commit): - Generals/GeneralsMD/.../MetaEvent.h: replaced m_lastKeyDown/m_lastModState members with upstream's KeyDownInfo m_keyDownInfos[KEY_COUNT] struct to match the refactored translator (auto-merge had unioned both). - Generals/GeneralsMD/.../MetaEvent.cpp: resolved UU by taking upstream's onKeyEvent() dispatch + dropped now-dead m_lastKeyDown/m_lastModState member initializers in the constructor. - Core/GameEngine/Include/Common/GameAudio.h: kept upstream's signature change (nextMusicTrack/prevMusicTrack now return AsciiString; getMusicTrackName removed from base). Updated our OpenAL backend (Core/GameEngineDevice/{Include,Source}/OpenALAudioDevice/) to match. - Core/Libraries/Include/Lib/BaseType.h: added missing BitsAreSet macro that upstream's MetaEvent code depends on. - AGENTS.md: cleared pre-existing merge markers (not from this sync; left from commit 996eedd). - GeneralsMD/.../Source/OpenALAudioManager.cpp stub: signature parity. Preserved (no merge change): - GeneralsX cross-platform stack: SDL3, DXVK, OpenAL, FFmpeg - All .github/ CI/CD infrastructure intact - GeneralsX-specific patches and GeneralsX @BugFix annotations Verified: - macos-vulkan configure + build (GeneralsX + GeneralsXZH) - Runtime smoke for both products (clean init, no crash) - No merge markers in tree (excluding build/ artifacts) - Cross-platform audit: no platform-specific code leaked into shared headers; SDL3/DXVK/OpenAL/FFmpeg layers untouched by upstream Deferred to CI: - linux64-deploy configure + build (validated locally but heavy docker image build; CI covers) See docs/WORKDIR/planning/PLAN-2026-06-04_THESUPERHACKERS_SYNC.md for the full conflict resolution report and risk analysis. Refs: TheSuperHackers#2710, TheSuperHackers#2747, TheSuperHackers#2718, TheSuperHackers#2577, TheSuperHackers#2758
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.
Description
Syncs 5 commits from
TheSuperHackers/main(7c78a5e17) into thethesuperhackers-sync-06-04-2026branch. Last local sync ancestorwas
20f42549c.This is a small, well-scoped sync. The bulk of the upstream
file-unification work (into
Core/) was absorbed by previous syncs;this sync is a clean refactor + a couple of bug fixes.
Changes Brought In
fix(memory): Fix various memory leaks (2)— defensiveguards + RAII placement across ~22 files
bugfix(object): Avoid crash in Object::onDestroy with dangling contain module— null check + cached pointer(Troop Crawler / Reinforcement Pad scenario)
fix(milesaudiomanager): Prevent multithread crashing + simplify— newMilesAudioManagerDummy,mutex.huse, newPS_Stoppingstatefix(metaevent): Ignore order in which modifier keys are released— bundled with the refactor belowrefactor(metaevent): Split MetaEventTranslator::translateGameMessage()— new
onKeyEvent/onKeyPressed/onKeyModStateRemovedmethods,KeyDownInfostruct replacingm_lastKeyDown/m_lastModStateConflict Resolution
2 real
UUconflicts (bothMetaEvent.cpp):Resolved by taking upstream's
onKeyEvent(msg, disp)dispatch.The new methods are auto-merged into the file body; the conflict was
only the inline keyboard handling block.
4 broken auto-merge sites — hand-repaired:
Generals{,MD}/.../MetaEvent.h— git auto-merge unioned upstream'snew
KeyDownInfostruct on top of our oldm_lastKeyDown/m_lastModStatemembers. Replaced the member block with upstream'sKeyDownInfo m_keyDownInfos[KEY_COUNT].Generals{,MD}/.../MetaEvent.cppconstructors — still initializedthe now-dead members. Dropped those initializers.
1 downstream API propagation:
Core/GameEngine/Include/Common/GameAudio.h— base class signatureschanged:
nextMusicTrack/prevMusicTracknow returnAsciiString;getMusicTrackNameremoved from abstract base. Our OpenAL backend(
Core/GameEngineDevice/.../OpenALAudioManager.{h,cpp}) was updatedto match. The dead stub in
GeneralsMD/.../Source/OpenALAudioManager.cppupdated for tree parity.
1 build fix required by upstream code:
Core/Libraries/Include/Lib/BaseType.h— added missingBitsAreSetmacro that upstream's MetaEvent code depends on. Platform-neutral.
1 housekeeping:
AGENTS.md— cleared pre-existing merge markers (from commit996eedd4e, NOT from this sync). Kept the "Updated upstream" versionwhich matches the current file structure.
No blanket strategies — each file was analyzed and resolved
individually.
Cross-Platform Integrity
Full audit performed:
W3DModelDraw.cpp(platform-neutral)AudioManagersignatures (compile-clean)mutex.h(cross-platform, uses
std::atomic)interlocked_adapter.h: VC6-compat shim gated on_MSC_VER < 1300,inert on Linux/macOS
.github/CI/CD infrastructure: intact, untouchedGeneralsX @bugfixannotations: preservedThe GeneralsX cross-platform stack (SDL3 + DXVK + OpenAL + FFmpeg)
is fully preserved.
Validation
macos-vulkanconfigurez_generals(GeneralsXZH) buildGeneralsXtarget buildbuild/artifacts and third-party FetchContent)linux64-deployDocker buildFiles / Subsystems Needing Extra Review
KeyDownInfo m_keyDownInfos[KEY_COUNT]is sized correctly for the system key count on all platforms
GameAudio.hbase API change — any third-party audio backend addedlater must return
AsciiStringfrom music-track methodsMilesAudioManagerDummy; reference-onlyon Linux/macOS but must compile
W3DModelDraw.cpp—animHandlelifecycle refactor; verifylong-session W3D animations
GeneralsMD/.../Source/OpenALAudioManager.cpp—matches new signatures for tree parity
Testing Checklist
linux64-deploy+linux64-testing) must passmingw-w64-i686,vc6,win32) must passReferences
Full conflict resolution plan and risk analysis:
docs/WORKDIR/planning/PLAN-2026-06-04_THESUPERHACKERS_SYNC.md