Fix compiler warning (#1492)

This commit is contained in:
stefansjfw
2020-03-09 23:21:33 +01:00
committed by GitHub
parent 965b098d66
commit 7ac378dcd3
2 changed files with 3 additions and 3 deletions

View File

@@ -140,10 +140,10 @@ inline void ParseDeviceId(PCWSTR deviceId, PWSTR parsedId, size_t size)
}
}
inline int OpacitySettingToAlpha(int opacity)
inline unsigned char OpacitySettingToAlpha(int opacity)
{
// convert percentage to a 0-255 alpha value
return static_cast<int>(opacity * 2.55);
return static_cast<unsigned char>(opacity * 2.55);
}
UINT GetDpiForMonitor(HMONITOR monitor) noexcept;