Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // start of Update ()
- keyboard = SDL_GetKeyboardState (&numKeys);
- if (numKeys > lastNumKeys)
- {
- if (lastKeyboard) free ((void *) lastKeyboard);
- lastKeyboard = (Uint8 *) malloc (numKeys * sizeof (Uint8));
- }
- // end of Update ()
- memcpy ((void *) lastKeyboard, (void *) keyboard, numKeys * sizeof (Uint8));
- lastNumKeys = numKeys;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement