Code format

This commit is contained in:
floppyhammer 2023-02-22 14:38:56 +08:00
parent 1b371ae3c1
commit c388b87824

View File

@ -44,8 +44,10 @@
// Update window theme (light/dark) // Update window theme (light/dark)
// //
static void updateTheme(HWND hWnd) { static void updateTheme(HWND hWnd)
if (_glfw.win32.uxtheme.uxThemeAvailable && _glfw.win32.uxtheme.darkTitleAvailable) { {
if (_glfw.win32.uxtheme.uxThemeAvailable && _glfw.win32.uxtheme.darkTitleAvailable)
{
BOOL value = _glfw.win32.uxtheme.ShouldAppsUseDarkMode() & 0x1; BOOL value = _glfw.win32.uxtheme.ShouldAppsUseDarkMode() & 0x1;
DwmSetWindowAttribute(hWnd, DwmSetWindowAttribute(hWnd,
DWMWA_USE_IMMERSIVE_DARK_MODE, DWMWA_USE_IMMERSIVE_DARK_MODE,
@ -1164,9 +1166,11 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l
} }
case WM_THEMECHANGED: case WM_THEMECHANGED:
case WM_SETTINGCHANGE: { case WM_SETTINGCHANGE:
{
updateTheme(window->win32.handle); updateTheme(window->win32.handle);
} break; break;
}
case WM_GETDPISCALEDSIZE: case WM_GETDPISCALEDSIZE:
{ {