Fixed GLXGears to work with SDL 1.2

This commit is contained in:
pelya
2010-07-22 13:53:33 +03:00
parent 1e20b02f1c
commit 6c2f60ec2b

View File

@@ -451,11 +451,19 @@ main(int argc, char *argv[])
break;
}
}
#if SDL_VERSION_ATLEAST(1,3,0)
keys = SDL_GetKeyboardState(NULL);
if ( keys[SDL_SCANCODE_ESCAPE] ) {
done = 1;
}
#else
keys = SDL_GetKeyState(NULL);
if ( keys[SDLK_ESCAPE] ) {
done = 1;
}
#endif
run_gears();
}