--- hatari/tests/keymap/listkeys.c 2019/04/09 08:50:51 1.1 +++ hatari/tests/keymap/listkeys.c 2019/04/09 08:56:11 1.1.1.2 @@ -1,4 +1,3 @@ - /* Print out all the keysyms we have, just to verify them */ #include @@ -10,16 +9,21 @@ int main(int argc, char *argv[]) { +#if SDL_MAJOR_VERSION > 1 + #warning "SDL2 doesn't support iterating over all keys" + printf("Sorry, SDL2 doesn't support iterating over all keys.\n"); +#else SDLKey key; - - if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) { + if (SDL_Init(SDL_INIT_VIDEO) < 0) { fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); exit(1); } - for ( key=SDLK_FIRST; key