aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/windows
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-06-03 15:00:49 +0200
committerArisotura <thetotalworm@gmail.com>2019-06-03 15:00:49 +0200
commit4a4415fc2ec067fb79881e17e14953b69ef80e0c (patch)
treee62443817e1d5ee7e652edcd57dfa8ec97895353 /src/libui_sdl/libui/windows
parent43e3e53afc4a8777592333717cfc4f4b304051eb (diff)
more work on OSD
Diffstat (limited to 'src/libui_sdl/libui/windows')
-rw-r--r--src/libui_sdl/libui/windows/draw.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libui_sdl/libui/windows/draw.cpp b/src/libui_sdl/libui/windows/draw.cpp
index 11a777d..9a815b9 100644
--- a/src/libui_sdl/libui/windows/draw.cpp
+++ b/src/libui_sdl/libui/windows/draw.cpp
@@ -522,7 +522,7 @@ void uiDrawRestore(uiDrawContext *c)
// bitmap API
-uiDrawBitmap* uiDrawNewBitmap(uiDrawContext* c, int width, int height)
+uiDrawBitmap* uiDrawNewBitmap(uiDrawContext* c, int width, int height, int alpha)
{
uiDrawBitmap* bmp;
HRESULT hr;
@@ -532,7 +532,8 @@ uiDrawBitmap* uiDrawNewBitmap(uiDrawContext* c, int width, int height)
D2D1_BITMAP_PROPERTIES bp2 = D2D1::BitmapProperties();
bp2.dpiX = 0;
bp2.dpiY = 0;
- bp2.pixelFormat = D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE);
+ bp2.pixelFormat = D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM,
+ alpha ? D2D1_ALPHA_MODE_PREMULTIPLIED : D2D1_ALPHA_MODE_IGNORE);
//c->rt->BeginDraw();