Ok, I think I got the pause working alright except for one bug. If a person press p sometimes it stops like its supposed to but other times it pauses and then resumes. I believe somehow the program reads the p key being pressed down more than once when you only pressed it down once.
How can I avoid this? I use SDL and I was trying to put a SDL_Delay like this:
// If user presses 'p' pause or unpause the gameif (g_input->getInput(SDLK_p)){ if (g_pause == false) g_pause = true; else g_pause = false; SDL_Delay(75);}
I've been trying to vary the SDL_Delay as well but with no success. Any ideas?