changeset 1988:197f9463efa8

Win: Fix building on Windows XP with SDK 7.1.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 16 Sep 2019 00:16:36 +0000
parents 21811c9e2eaf
children 1dd49705bd1a
files win/dw.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/win/dw.c	Sun Sep 15 23:02:16 2019 +0000
+++ b/win/dw.c	Mon Sep 16 00:16:36 2019 +0000
@@ -3720,7 +3720,10 @@
          /* If we are in full dark mode, or we have custom colors selected...
           * we will draw the status window ourselves... otherwise DrawStatusText()
           */
-         if((_DW_DARK_MODE_ALLOWED == 2 && _DW_DARK_MODE_ENABLED) ||
+         if(
+#ifdef AEROGLASS
+            (_DW_DARK_MODE_ALLOWED == 2 && _DW_DARK_MODE_ENABLED) ||
+#endif
             (cinfo && cinfo->fore != -1 && cinfo->fore != DW_CLR_DEFAULT &&
              cinfo->back !=- -1 && cinfo->back != DW_CLR_DEFAULT))
          {
@@ -6857,6 +6860,7 @@
  */
 HWND API dw_radiobutton_new(char *text, ULONG id)
 {
+   ColorInfo *cinfo;
    HWND tmp = CreateWindow(BUTTONCLASSNAME,
                      UTF8toWide(text),
                      WS_CHILD | BS_AUTORADIOBUTTON |
@@ -6871,7 +6875,7 @@
    if(_SetWindowTheme)
       _SetWindowTheme(tmp, L"", L"");
 
-   ColorInfo *cinfo = calloc(1, sizeof(ColorInfo));
+   cinfo = calloc(1, sizeof(ColorInfo));
    cinfo->fore = cinfo->back = -1;
    cinfo->pOldProc = SubclassWindow(tmp, _BtProc);
    SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo);