Better support for Handling Limit Adjusters and mods loading files from DllMain#137
Open
CookiePLMonster wants to merge 3 commits into
Open
Better support for Handling Limit Adjusters and mods loading files from DllMain#137CookiePLMonster wants to merge 3 commits into
DllMain#137CookiePLMonster wants to merge 3 commits into
Conversation
Implements a III Aircraft TODO, but also improves compatibility with the Handling Limit Adjuster.
f50c2e3 to
ac68e41
Compare
Contributor
Author
|
|
ac68e41 to
c8ac5b2
Compare
Contributor
Author
|
As suggested by @nta, it is possible to hook the ASI's IAT before it calls DllMain by leveraging DLL Load Notifications. They don't have publicly exposed API functions, but as evidenced, they're somewhat documented - and we're using them as conservatively as possible, bailing out on any error or a missing function. If Microsoft ever "delivers" and removes those functions, we simply fall back to the current behaviour of hooking the IAT directly after |
DllMain
This lets modloader intercept IAT before ASIs call DllMain, so previously incompatible mods may now be compatible.
c8ac5b2 to
75c57b5
Compare
…III/VC * CLEO trims trailing whitespace from FXTs, modloader should too. * III/VC PrintString has a bug where it always reads one character past the null terminator. This caused a crash if an unreadable page directly followed the FXT string. The easiest fix is to just use two null terminators.
Contributor
Author
|
Added some extra code to FXT loading to:
|
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.
CHandlingDataarray for the handling hot-reload function, now it reads the code pointer every time. This way it'll work best it can with OLA and other mods breaking the handling limits.LoadLibrary.PrintStringin those games has a bug where they always read one character past the null terminator. This caused a crash if the string was directly followed by unreadable memory.Fixes #136. Many mods in the "incompatible" list are probably now compatible, as many of them were excluded solely because they are loading files in DllMain - but I have not verified them.
Fixes #138.