https://git.reactos.org/?p=reactos.git;a=commitdiff;h=70d5c864bc14a2427ca7f0...
commit 70d5c864bc14a2427ca7f0b762f20589c1206491 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Thu Oct 12 19:43:29 2023 +0900 Commit: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com CommitDate: Thu Oct 12 19:43:29 2023 +0900
[MSPAINT] Do type-cast (float) for xDpi and yDpi
CORE-19094 --- base/applications/mspaint/dib.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/base/applications/mspaint/dib.cpp b/base/applications/mspaint/dib.cpp index 9e7080e3da4..10f4511c5c7 100644 --- a/base/applications/mspaint/dib.cpp +++ b/base/applications/mspaint/dib.cpp @@ -231,8 +231,8 @@ HBITMAP InitializeImage(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile) return NULL;
HDC hScreenDC = ::GetDC(NULL); - g_xDpi = ::GetDeviceCaps(hScreenDC, LOGPIXELSX); - g_yDpi = ::GetDeviceCaps(hScreenDC, LOGPIXELSY); + g_xDpi = (float)::GetDeviceCaps(hScreenDC, LOGPIXELSX); + g_yDpi = (float)::GetDeviceCaps(hScreenDC, LOGPIXELSY); ::ReleaseDC(NULL, hScreenDC);
return SetBitmapAndInfo(hBitmap, name, pFound, isFile); @@ -293,8 +293,8 @@ HBITMAP DoLoadImageFile(HWND hwnd, LPCWSTR name, BOOL fIsMainFile) if (xDpi <= 0 || yDpi <= 0) { HDC hDC = ::GetDC(NULL); - xDpi = ::GetDeviceCaps(hDC, LOGPIXELSX); - yDpi = ::GetDeviceCaps(hDC, LOGPIXELSY); + xDpi = (float)::GetDeviceCaps(hDC, LOGPIXELSX); + yDpi = (float)::GetDeviceCaps(hDC, LOGPIXELSY); ::ReleaseDC(NULL, hDC); }