Uint8 *keystate; // check the keyboard
while(1) { // wait for input to break
keystate = SDL_GetKeyState(NULL);
if(keystate[SDLK_s])
return;
}
sdl getch
Im doing a test program for my A*, I use to use getch() for stepping through programs... but since this program uses SDL I dont want to shift between the console window and the sdl window, I made this function to wait for the user to press "s" (s for step that is [smile] hehe). But it doesnt work, when I reach this loop the program stands still and nothing happens. And, yes, Ive tried to press "s", lol.
Seemed to be to simple to fail. :S What am I doing wrong?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement