Zhiyi Zhang (@zhiyi) commented about dlls/uxtheme/system.c:
UnregisterUserApiHook(); return TRUE; } + +/********************************************************************** + * ShouldSystemUseDarkMode (UXTHEME.138) + * + * RETURNS + * whether or not the system should use dark mode + */ +BOOL WINAPI ShouldSystemUseDarkMode(void) +{ + DWORD systemUsesLightTheme, systemUsesLightThemeType, systemUsesLightThemeSize = sizeof(DWORD); + HKEY hk = HKEY_CURRENT_USER; +
See some of the similar problems mentioned in the tests. I prefer to initialize system_uses_light_theme with TRUE and then if querying AppsUseLightTheme succeeds and the value is 0 then make system_uses_light_theme FALSE. Some online information also suggests that this function changes the last error code. Please add a test and implement that as well. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3959#note_47186