NotNite / GDWeave

Mod loader & runtime script patching for Godot
MIT License
133 stars 12 forks source link

Workaround Win32 loader lock #22

Closed DeltaNeverUsed closed 1 week ago

DeltaNeverUsed commented 1 week ago

timeBeginPeriod gets called before the game fully starts up, so instead of doing the initialization in dllmain, we should be doing it there to avoid the loader lock.

This is to address #21

NotNite commented 1 week ago

I'm not a huge fan of the amount of stuff inside of this PR - seems to be pulling in a lot more than we need. I opted for a (jankier) solution in https://github.com/NotNite/GDWeave/pull/23 that hooks the main function and does the initialization there, skipping loader lock in the process.

Best course of action is to probably test both heavily - you're on Linux, right? If so, I could use your help once the CI finishes building on my branch :)

DeltaNeverUsed commented 1 week ago

I'm not a huge fan of the amount of stuff inside of this PR

Yeah, sorry about that

you're on Linux, right? If so, I could use your help once the CI finishes building on my branch :)

I am indeed on Linux, and I'd be happy to help

NotNite commented 1 week ago

No need to apologize - it looks like a large chunk of it is just from the library, and proxy-dll is pretty inflexible, so your choices make sense. GitHub Actions built the DLL on both branches by now, so if you could test them with and without .NET installed into the prefix I'd appreciate it.

DeltaNeverUsed commented 1 week ago

It appears to work fine on linux with and without dotnet installed :+1:

DeltaNeverUsed commented 1 week ago

Everything's worked fine on my end with those new DLLs. When do you think a new release will be ready?

NotNite commented 1 week ago

I'll likely close this PR and merge mine tomorrow morning, then do a release shortly after.

DeltaNeverUsed commented 1 week ago

Sounds good!