mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 05:55:45 +00:00
[MSPAINT] Do type-cast (float) for xDpi and yDpi
CORE-19094
This commit is contained in:
parent
409df2355e
commit
70d5c864bc
1 changed files with 4 additions and 4 deletions
|
@ -231,8 +231,8 @@ HBITMAP InitializeImage(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
HDC hScreenDC = ::GetDC(NULL);
|
HDC hScreenDC = ::GetDC(NULL);
|
||||||
g_xDpi = ::GetDeviceCaps(hScreenDC, LOGPIXELSX);
|
g_xDpi = (float)::GetDeviceCaps(hScreenDC, LOGPIXELSX);
|
||||||
g_yDpi = ::GetDeviceCaps(hScreenDC, LOGPIXELSY);
|
g_yDpi = (float)::GetDeviceCaps(hScreenDC, LOGPIXELSY);
|
||||||
::ReleaseDC(NULL, hScreenDC);
|
::ReleaseDC(NULL, hScreenDC);
|
||||||
|
|
||||||
return SetBitmapAndInfo(hBitmap, name, pFound, isFile);
|
return SetBitmapAndInfo(hBitmap, name, pFound, isFile);
|
||||||
|
@ -293,8 +293,8 @@ HBITMAP DoLoadImageFile(HWND hwnd, LPCWSTR name, BOOL fIsMainFile)
|
||||||
if (xDpi <= 0 || yDpi <= 0)
|
if (xDpi <= 0 || yDpi <= 0)
|
||||||
{
|
{
|
||||||
HDC hDC = ::GetDC(NULL);
|
HDC hDC = ::GetDC(NULL);
|
||||||
xDpi = ::GetDeviceCaps(hDC, LOGPIXELSX);
|
xDpi = (float)::GetDeviceCaps(hDC, LOGPIXELSX);
|
||||||
yDpi = ::GetDeviceCaps(hDC, LOGPIXELSY);
|
yDpi = (float)::GetDeviceCaps(hDC, LOGPIXELSY);
|
||||||
::ReleaseDC(NULL, hDC);
|
::ReleaseDC(NULL, hDC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue