Skip to content

Commit

Permalink
cio: fixed touch logic
Browse files Browse the repository at this point in the history
  • Loading branch information
magicnat committed Feb 8, 2020
1 parent 2c0d884 commit f64c14b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chuniio/chuniio.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ LRESULT CALLBACK chuni_winproc_hook(HWND hwnd, UINT msg, WPARAM w_param, LPARAM
if (!raw_input) ScreenToClient(hwnd, &local_point);
int slider_id = get_slider_from_pos(local_point.x, local_point.y);
int ir_id = get_ir_from_pos(local_point.x, local_point.y);
if (slider_id >= 0 && slider_id < 32) {
clicked_sliders[slider_id] = 128;
if (slider_id >= 0 && slider_id < 32 && clicked_sliders[slider_id] == 0) {
clicked_sliders[slider_id] = (p.dwFlags & TOUCHEVENTF_UP) ? 0 : 128;
}

if (ir_id >= 0 && ir_id < 6) {
chuni_io_ir(&chuni_ir_map_local, ir_id, true);
chuni_io_ir(&chuni_ir_map_local, ir_id, !(p.dwFlags & TOUCHEVENTF_UP));
}

}
Expand Down

0 comments on commit f64c14b

Please sign in to comment.