|
|
1.1 root 1: /* Print out all the keysyms we have, just to verify them */
2:
3: #include <stdio.h>
4: #include <ctype.h>
5: #include <stdlib.h>
6: #include <string.h>
7:
8: #include "SDL.h"
9:
10: int main(int argc, char *argv[])
11: {
1.1.1.2 ! root 12: #if SDL_MAJOR_VERSION > 1
! 13: #warning "SDL2 doesn't support iterating over all keys"
! 14: printf("Sorry, SDL2 doesn't support iterating over all keys.\n");
! 15: #else
1.1 root 16: SDLKey key;
1.1.1.2 ! root 17: if (SDL_Init(SDL_INIT_VIDEO) < 0) {
1.1 root 18: fprintf(stderr, "Couldn't initialize SDL: %s\n",
19: SDL_GetError());
20: exit(1);
21: }
1.1.1.2 ! root 22:
! 23: for (key = SDLK_FIRST; key < SDLK_LAST; ++key) {
1.1 root 24: printf("Key #%d, \"%s\"\n", key, SDL_GetKeyName(key));
25: }
26: SDL_Quit();
1.1.1.2 ! root 27: #endif
1.1 root 28: return 0;
29: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.