瀏覽代碼

pstats: Fix compile error on Windows with `STDFLOAT_DOUBLE=1`

Fixes #1408
rdb 3 年之前
父節點
當前提交
3dbaf80841
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      pandatool/src/win-stats/winStatsMonitor.cxx

+ 3 - 1
pandatool/src/win-stats/winStatsMonitor.cxx

@@ -347,7 +347,9 @@ choose_collector_color(int collector_index) {
     sizeof(CHOOSECOLORA),
     sizeof(CHOOSECOLORA),
     _window,
     _window,
     0,
     0,
-    RGB(encode_sRGB_uchar(current[0]), encode_sRGB_uchar(current[1]), encode_sRGB_uchar(current[2])),
+    RGB(encode_sRGB_uchar((float)current[0]),
+        encode_sRGB_uchar((float)current[1]),
+        encode_sRGB_uchar((float)current[2])),
     (LPDWORD)custom_colors,
     (LPDWORD)custom_colors,
     CC_FULLOPEN | CC_RGBINIT,
     CC_FULLOPEN | CC_RGBINIT,
     0,
     0,