Original Post
Heyahn
Given this bit of code:
/* We''ve pressed the mouse down */
if (SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(iMouse) && bClick[iMouse] == false && bTest[iMouse] == false)
{
bTest[iMouse] = true;
printf("%i was pressed down.\n", iMouse);
}
/* The mouse has been released */
else if (!SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(iMouse) && bTest[iMouse] == true)
{
bClick[iMouse] = true;
printf("%i was clicked.\n", iMouse);
}
If bClick is false and bTest is true, the mouse button is depressed (being pressed) - when bTest and bClick are both true, the mouse button has been pressed then released (clicked).
When I left-mouse click, it works perfectly - the depression is detected, and the release is detected; however, any other button (middle or right), the depression is detected, but the release is not.
bTest and bClick are simply boolean variables. And, before you ask, yes, they have enough array members.
I''ve tried using this bit of code as both being called once per frame, and during an SDL event, but no go. What the heck am I missing?
--LordKaT