Skip to content

Commit

Permalink
Minor update reverse arrow cursor size calculation, issue #635.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Apr 17, 2024
1 parent edd268e commit 8950869
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scintilla/win32/PlatWin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ int SystemMetricsForDpi(int nIndex, UINT dpi) NP2F_noexcept {
}

int value = ::GetSystemMetrics(nIndex);
value = (dpi == g_uSystemDPI) ? value : ::MulDiv(value, dpi, g_uSystemDPI);
if (dpi != g_uSystemDPI) {
value = ::MulDiv(value, dpi, g_uSystemDPI);
}
return value;
}

Expand Down Expand Up @@ -2897,7 +2899,7 @@ HCURSOR LoadReverseArrowCursor(UINT dpi, int cursorBaseSize) noexcept {
int width;
int height;
if (cursorBaseSize > defaultCursorBaseSize) {
width = MulDiv(cursorBaseSize, dpi, g_uSystemDPI);
width = ::MulDiv(cursorBaseSize, dpi, USER_DEFAULT_SCREEN_DPI);
height = width;
} else {
width = SystemMetricsForDpi(SM_CXCURSOR, dpi);
Expand Down

0 comments on commit 8950869

Please sign in to comment.