Skip to content

Get rid of the Thread.Sleep(1) workaround in InjectorHelpers#56

Merged
ghorsington merged 2 commits intoBepInEx:masterfrom
js6pak:assign-trampoline-immediately
Nov 13, 2022
Merged

Get rid of the Thread.Sleep(1) workaround in InjectorHelpers#56
ghorsington merged 2 commits intoBepInEx:masterfrom
js6pak:assign-trampoline-immediately

Conversation

@js6pak
Copy link
Copy Markdown
Member

@js6pak js6pak commented Nov 11, 2022

Assigns the trampoline before applying the detour so there are never any nulls.
Unfortunately this is a breaking change because we need to add the GenerateTrampoline to IDetour, but because afaik BepInEx is the only consumer of that api we could just overlook it?

Copy link
Copy Markdown
Member

@Kasuromi Kasuromi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I agree on overlooking this breaking change when pushing the next release (as we've done before), but I'd like to hear what @ghorsington thinks before we do so.

@ghorsington ghorsington merged commit e086c36 into BepInEx:master Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants