Skip to content
This repository was archived by the owner on Jan 31, 2026. It is now read-only.

Comments

Fix Harmony instance conflict in TorsoMapperFix#14

Closed
Copilot wants to merge 3 commits intobug/thread-not-startedfrom
copilot/sub-pr-8-again
Closed

Fix Harmony instance conflict in TorsoMapperFix#14
Copilot wants to merge 3 commits intobug/thread-not-startedfrom
copilot/sub-pr-8-again

Conversation

Copy link
Contributor

Copilot AI commented Nov 23, 2025

Addresses feedback from #8 where TorsoMapperFix was creating a second Harmony instance instead of reusing the main mod's instance, causing potential patch conflicts.

Changes

  • Store the main Harmony instance (com.bhaptics.resonite.fix) in TorsoMapperFix when ApplyPatches is called
  • Use the stored instance in CommonAvatarBuilderPatch.Postfix instead of creating a new one (com.nalathethird.bHapticsManager.TorsoMapper)
public static class TorsoMapperFix {
    internal static Harmony? _harmonyInstance = null;
    
    public static void ApplyPatches(Harmony harmony) {
        _harmonyInstance = harmony;  // Store for later use
        harmony.PatchAll(typeof(TorsoMapperFix));
    }
}

// In CommonAvatarBuilderPatch.Postfix:
- var harmony = new Harmony("com.nalathethird.bHapticsManager.TorsoMapper");
- ApplyTorsoMapperPatch(harmony);
+ ApplyTorsoMapperPatch(TorsoMapperFix._harmonyInstance);

All patches now share the same Harmony instance.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 23, 2025 03:40
Co-authored-by: nalathethird <36301692+nalathethird@users.noreply.github.com>
Co-authored-by: nalathethird <36301692+nalathethird@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on bHapticsManager architecture refactor Fix Harmony instance conflict in TorsoMapperFix Nov 23, 2025
Copilot AI requested a review from nalathethird November 23, 2025 03:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants