Hello,
first excuse my english, i'm french.
i'll try to explain my problem simply : i want to detect a mouse left click (easy), but detect just a "click" (which means mouse left button down, then released).
i've tried that :
but the printf is but until the left button is released.
does anybody got an answer for me please ?
thx for all !
Hackish solution:
if (mouse_b & 1) { printf("Left mouse button pressed\n"); while (mouse_b & 1) poll_mouse(); // not strictly necessary, but can't hurt either }
Note that this locks your application until the mouse button is released, so a more sophisticated approach would be: