Skip to content

Commit 75a340d

Browse files
committed
changelog.txt: update for d2d scaling
1 parent 4b53924 commit 75a340d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Version 1.09.0
3535
- github #325, #326: fbc: constant folding ASC() on constant strings with embedded NUL characters - previously ASC returned 0 for anything past the first embedded NUL char, for example ASC(!"A\000B",3) incorrectly returned 0 and should return 66
3636
- rtlib: define fb_AtomicSetThreadFlags() even in the non-multithreaded version of run time library - it is needed by thread_core.c:threadproc() - unusual but not impossible to link the non-multithreaded rtlib and call thread functions
3737
- darwin: a variety of improvements to allow compiling and linking (TeeEmCee)
38+
- gfxlib2: fix d2d scaling issues for high dpi (adeyblue)
3839

3940

4041
Version 1.08.0

src/gfxlib2/win32/gfx_driver_d2d.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,13 @@ static int GdiInteropSetup(D2DGlobalState* pGlobalState, HWND hwnd)
440440
pD3DTexture = NULL;
441441
renderProps.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
442442
renderProps.usage = D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE;
443-
renderProps.dpiX = renderProps.dpiY = 96.f;
443+
renderProps.dpiX = renderProps.dpiY = 96.f;
444444
if(NOTIFY_FAILED_HR(ID2D1Factory_CreateDxgiSurfaceRenderTarget(pGlobalState->pD2DFactory, pDXGISurface, &renderProps, &pRenderTarget))) {
445445
goto errorReturn;
446446
}
447447
bitmapProps.pixelFormat.format = texDesc.Format;
448448
bitmapProps.pixelFormat.alphaMode = renderProps.pixelFormat.alphaMode;
449-
bitmapProps.dpiX = bitmapProps.dpiY = 96.f;
449+
bitmapProps.dpiX = bitmapProps.dpiY = 96.f;
450450
if(NOTIFY_FAILED_HR(ID2D1RenderTarget_CreateBitmap(pRenderTarget, bitmapSize, NULL, stride, &bitmapProps, &pBitmap))) {
451451
goto errorReturn;
452452
}
@@ -515,7 +515,7 @@ static int D2DDirectSetup(D2DGlobalState* pGlobalState, HWND hwnd)
515515
renderProps.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
516516
renderProps.usage = D2D1_RENDER_TARGET_USAGE_NONE;
517517
renderProps.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
518-
renderProps.dpiX = renderProps.dpiY = 96.f;
518+
renderProps.dpiX = renderProps.dpiY = 96.f;
519519
while(*pFormats != DXGI_FORMAT_UNKNOWN) {
520520
renderProps.pixelFormat.format = *(pFormats++);
521521
if(!NOTIFY_FAILED_HR(ID2D1Factory_CreateHwndRenderTarget(
@@ -531,7 +531,7 @@ static int D2DDirectSetup(D2DGlobalState* pGlobalState, HWND hwnd)
531531
goto errorReturn;
532532
}
533533
bitmapProps.pixelFormat = renderProps.pixelFormat;
534-
bitmapProps.dpiX = bitmapProps.dpiY = 96.f;
534+
bitmapProps.dpiX = bitmapProps.dpiY = 96.f;
535535
if(NOTIFY_FAILED_HR(ID2D1HwndRenderTarget_CreateBitmap(
536536
pHwndRenderTarget,
537537
hwndRenderProps.pixelSize,

0 commit comments

Comments
 (0)