Remove ABS in favor of Math::abs

This commit is contained in:
kobewi 2022-11-30 17:56:32 +01:00
parent 3d9b05ad4a
commit 10f6c01b9c
68 changed files with 142 additions and 146 deletions

View file

@ -5081,7 +5081,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
int64_t pen_id = GET_POINTERID_WPARAM(wParam);
if (uMsg == WM_POINTERDOWN) {
mb->set_pressed(true);
if (pointer_down_time.has(pen_id) && (pointer_prev_button[pen_id] == mb->get_button_index()) && (ABS(coords.y - pointer_last_pos[pen_id].y) < GetSystemMetrics(SM_CYDOUBLECLK)) && GetMessageTime() - pointer_down_time[pen_id] < (LONG)GetDoubleClickTime()) {
if (pointer_down_time.has(pen_id) && (pointer_prev_button[pen_id] == mb->get_button_index()) && (Math::abs(coords.y - pointer_last_pos[pen_id].y) < GetSystemMetrics(SM_CYDOUBLECLK)) && GetMessageTime() - pointer_down_time[pen_id] < (LONG)GetDoubleClickTime()) {
mb->set_double_click(true);
pointer_down_time[pen_id] = 0;
} else {