diff options
author | Dave Blake <oak99sky@yahoo.co.uk> | 2020-07-15 12:30:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 12:30:39 +0100 |
commit | 808f1292aa46065ae3bd0ca52e3bc5747e2c81f0 (patch) | |
tree | ee86b2e581b5105da9450e27f8b5e50e60698dd2 | |
parent | f850dae246bccd31d98cd27df22d45eefba6a42a (diff) | |
parent | c4292bb8869b4f06150086fb7c9b854df153d743 (diff) |
Merge pull request #18151 from enen92/leiabackportoppacity
[Windows] Enable alpha blending for the Player (BackPort)
-rw-r--r-- | xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp | 1 | ||||
-rw-r--r-- | xbmc/utils/ColorUtils.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp index bf3ac0e651..62f9791183 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/WinRenderer.cpp @@ -290,6 +290,7 @@ void CWinRenderer::RenderUpdate(int index, int index2, bool clear, unsigned int ManageTextures(); ManageRenderArea(); Render(flags, DX::Windowing()->GetBackBuffer()); + DX::Windowing()->SetAlphaBlendEnable(true); } void CWinRenderer::PreInit() diff --git a/xbmc/utils/ColorUtils.cpp b/xbmc/utils/ColorUtils.cpp index b0732186fa..da1fc1238b 100644 --- a/xbmc/utils/ColorUtils.cpp +++ b/xbmc/utils/ColorUtils.cpp @@ -13,5 +13,5 @@ UTILS::Color ColorUtils::ChangeOpacity(const UTILS::Color color, const float opacity) { int newAlpha = ceil( ((color >> 24) & 0xff) * opacity); - return color + (newAlpha << 24); + return (color & 0x00FFFFFF) | (newAlpha << 24); }; |