On Wed Oct 11 01:39:28 2023 +0000, Louis Lenders wrote:
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
In that case, you should implement them. For ShouldAppsUseDarkMode(), there is a recent MR at https://gitlab.winehq.org/wine/wine/-/merge_requests/3959 that implements ShouldSystemUseDarkMode(). I think ShouldAppsUseDarkMode() is similar and uses the AppsUseLightTheme registry key. For AllowDarkModeForWindow() and SetPreferredAppMode(), they can be implemented as stubs for the moment. I also came across https://gist.github.com/rounk-ctrl/b04e5622e30e0d62956870d5c22b7017 which lists their usage.