Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
https://gitlab.com/Kaldaien/SpecialK/blob/0.10.xdr/src/SpecialK.cpp#L248
Diagnose what's evaluating as false and preventing the full execution, followed by compiling a variant of SK that doesn't have that behavior?
I ain't a developer, so you'll have to see what Kaldaien comes up with.
Could you try to answer the question how injecting SK differs from normal LoadLibraryA ?
If I simply denied loading the DLL, it would utterly destroy system performance because the DLL would be checking its whitelist constantly. It's important to partially initialize the DLL with an event that listens for global unload.
All injection-related code is actually in src/injection/injection.cpp, and src/SpecialK.cpp.
I came to this design after looking at other potential systems including simpler shim DLLs and finding a high potential for deadlock if LoadLibrary (...) is called during window creation in an application.
Shim loading can work, but it really needs to be done using the offical application compatibility layer in Windows, which loads your DLL as a substitute for some other DLL or for a specific imported DLL function. That prevents deadlocks and also loads the DLL earlier and less often. I considered using that but it would have made Special K less flexible than I'd like, so I went about optimizing the thing into a single self-hosting DLL with partial initialization and on-demand unload support.
I can point you to the regular expression matching code for the whitelist if you'd like to make some kind of change to the whitelisting, but I'd really like to keep injection handled by the DLL itself. I am obsesed with performance and that's the only way to keep injection overhead down to levels I am happy with.
On that note, Kal, wouldn’t it be semi-easy to add some form of global delay for the global injection before SK starts to fully initialize? As in, at the moment it typically starts to initialize the rest of SK in a process it instead goes and takes a nap for X number of seconds?
Or that part of the code is too heavily disconnected from how it reads config files and whatnot so this isn’t possible?
I think that’s the gist of it. If SK supported e.g. a “60 seconds delayed global injection” method or similar, it would allow users to use SK in games where hooking them directly on launch would otherwise end up in issues.
In theory, I could add a delay config parameter to the appcache database, but more than half of Special K's features disappear if you delay code injection and it gets worse the longer you delay the stuff so I've never been eager to implement this. I've delayed the one or two things where it's necessary (SteamAPI and input) but render APIs completely breakdown if delayed.