mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue