Fix _glfwSetThemeWin32

This commit is contained in:
ws909 2023-02-24 00:27:41 +01:00
parent a30e29fa0a
commit 73330df28a

View File

@ -2434,13 +2434,13 @@ void _glfwSetThemeWin32(_GLFWwindow* window, const _GLFWtheme* theme)
else
memcpy(&newTheme, theme, sizeof(_GLFWtheme));
if (newTheme->variation == GLFW_THEME_DEFAULT)
if (newTheme.variation == GLFW_THEME_DEFAULT)
{
applySystemTheme(window->win32.handle);
}
else
{
GLFWbool darkMode = theme->variation == GLFW_THEME_DARK;
GLFWbool darkMode = newTheme.variation == GLFW_THEME_DARK;
DwmSetWindowAttribute(window->win32.handle,
DWMWA_USE_IMMERSIVE_DARK_MODE,