could any one help me on SDL_GetMouseState(0,0)........ my coding is as below

if(SDL_GetMouseState(0,0)&SDL_BUTTON(SDL_BUTTON_LEFT))
{
//function calls
}

this coding works button when i click on the window the contents remain only till the button is in pressed state........

i just passed used a flag value in the GetMouseState if condition and checked the flag value to call the functions and it works.........

if(SDL_GetMouseState(0,0)&SDL_BUTTON(SDL_BUTTON_LEFT))
         flag=1;
if(flag==1)
//function calls
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.