DLSS Enabler static-embedding compatibility #1035
No reviewers
Labels
No labels
0.9
3rd party
bug
documentation
duplicate
enhancement
invalid
linux
master
question
undetermined
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
roman/OptiScaler2!1035
Loading…
Reference in a new issue
No description provided.
Delete branch "artur-graniszewski/feature/dlss-enabler-compat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds the ability to build OptiScaler as a static library and embed it into a
host DLL (e.g. DLSS Enabler), alongside the existing standalone DLL build.
All new behavior is gated behind the
OPTISCALER_STATICmacro and a dedicatedbuild configuration, so the default DLL build path is completely unaffected.
Changes
ReleaseStaticbuild configuration. Builds OptiScaler as a static.libwith the static CRT (
/MT) and definesOPTISCALER_STATIC. Because the CRT islinked statically, any static dependencies it pulls in (e.g. the FSR3 /
FidelityFX SDK) must be compiled in the same
/MTmode — mixing/MTand/MDwithin one module causes CRT symbol conflicts.
DllMaindemotion (static build only). UnderOPTISCALER_STATIC,DllMainis renamed to
org_dllMainvia a forced-include macro. It stops being the moduleentry point and becomes a regular function the host can call. In standard DLL
builds the macro is not defined, so
DllMainremains the entry point as before.OptiScaler_Init(HMODULE self, const OptiScalerConfig* cfg)and
OptiScaler_Shutdown()forward to the originalDllMainlogic withDLL_PROCESS_ATTACH/DLL_PROCESS_DETACH, preserving the existing init andcleanup paths. The host passes its own module handle for module-relative lookups.
OptiScalerConfigstruct for future use.host's own version-check code.
this is pretty cool. A compact dll.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.