We have no means of stopping the thread from DllMain on
DLL_PROCESS_DETACH without having a race condition - waiting on the
thread itself is not an option due to the loader lock.
The best we can do is just never unload the DLL as long as the thread is
active which is forever.
This fixes crashes in Mighty Switch Force! Collection while controllers
are unplugged - the game loads and frees xinput in a loop.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4065
Hi Zhiyi, it seems it's all more complicated then I thought. The tests failed and it seems i put the wrong function names at those ordinals.
The thread below at Autohotkey suggests that the ordinals belong to some undocumented functions ShouldAppsUseDarkMode, AllowDarkModeForWindow and SetPreferredAppMode, apparently they can only be imported by ordinal.
So should I now only test that they can be imported by ordinal (something like
proc = GetProcAddress(uxtheme, MAKEINTRESOURCEA(func[i].ordinal));
ok(proc, "getting function by ordinal failed"); )?
)
autohotkey thread: https://www.autohotkey.com/boards/viewtopic.php?t=94661&start=20
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4043#note_48238