Original Post
Hello,
I can read what keys are pressed with "Uint8 *keystate = SDL_GetKeyState(NULL);" and then checking keystate, and I can check wether or not a key is pressed with "if(event.type == SDL_KEYDOWN) key_is_pressed=true;"
But if I use them in combination, I get memory related crashes! I want to make something that waits until a key is pressed, and then immediatly knows what key has been pressed. So first I get an SDL event and check if it is SDL_KEYDOWN, and after that has happened, another function gets SDL_GetKeyState and checks which one it was with a switch. This seems to give random crashes with a windows error about memory could not be read. Is this a known problem? Is there a proper way to do what I want?
[edited by - BoopS on March 3, 2004 8:46:48 AM]