Skip to content

Fix library resolution issues by avoiding SetDllDirectory - #1192

Merged
microlith57 merged 1 commit into
EverestAPI:devfrom
SnipUndercover:fuck-microsoft
Nov 15, 2026
Merged

microlith57 merged 1 commit into
EverestAPI:devfrom
SnipUndercover:fuck-microsoft

Conversation

@SnipUndercover

Copy link
Copy Markdown
Member

For some users (specifically ones meeting the requirements for the ✨ AI feature ✨), Automatic Super Resolution would overwrite our native library path during D3D11 swapchain creation, ruining any attempt at resolving unmanaged libraries afterwards and crashing Celeste.
A detailed writeup about the issue and its cause can be found in this message in the Celeste Discord server.

This PR fixes this by injecting the path to lib64-win-x64 (or x86 for 32-bit Windows) to the beginning of PATH instead of using SetDllDirectory, as that is being overwritten.
This is similar to the workaround done via everest-env.txt (example below), except this patch reverts the old PATH on exit.

PATH=C:\Program Files (x86)\Steam\steamapps\common\Celeste\lib64-win-x64;${PATH}

@SnipUndercover SnipUndercover changed the title Fix dll resolution issues by avoiding SetDllDirectory Fix library resolution issues by avoiding SetDllDirectory Nov 11, 2026

@Popax21 Popax21 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

fuck microsoft.

I am Popax21 and I approve of this message 👍

For some users (specifically ones meeting the requirements for the
:sparkles: AI feature :sparkles:), Automatic Super Resolution would
overwrite our native library path during D3D11 swapchain creation,
ruining any attempt at resolving unmanaged libraries afterwards and
crashing Celeste.
@maddie480-bot maddie480-bot added the 1: review needed This PR needs 2 approvals to be merged (bot-managed) label Nov 11, 2026

@microlith57 microlith57 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:screwms_upscaled:

@maddie480-bot

Copy link
Copy Markdown
Member

The pull request was approved and entered the 3-day last-call window. Since no PR should be merged within 3 days of the next rolling release, the last-call window is extended further.
If no further reviews happen, it will end on Nov 15, 2026, 12:00 AM UTC, after which the pull request will be able to be merged.

@maddie480-bot maddie480-bot added 3: last call window This PR was approved, and is in the 5-day last-call window before getting merged (bot-managed) and removed 1: review needed This PR needs 2 approvals to be merged (bot-managed) labels Nov 11, 2026
@maddie480-bot

Copy link
Copy Markdown
Member

The last-call window for this pull request ended. It can now be merged if no blockers were brought up.

@maddie480-bot maddie480-bot added 4: ready to merge This PR was approved and the last-call window is over (bot-managed) and removed 3: last call window This PR was approved, and is in the 5-day last-call window before getting merged (bot-managed) labels Nov 15, 2026
@microlith57
microlith57 merged commit 9951e25 into EverestAPI:dev Nov 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4: ready to merge This PR was approved and the last-call window is over (bot-managed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants