diff options
| -rwxr-xr-x | build.sh | 4 | ||||
| -rw-r--r-- | lib/init.c | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -14,8 +14,8 @@ shift $((OPTIND-1)) [ "${1:-}" = "--" ] && shift if [ "$1" ]; then - printf -- "\n\nmaking src %s\n" "$1" - file="src/$1" + printf -- "\n\nmaking %s\n" "$1" + file="$1" clang -o bin/$(basename $file | sed 's/.c$//') $file $LIB `sdl2-config --cflags --libs` -lm $DEBUG else for file in src/*; do @@ -7,6 +7,10 @@ #include <SDL2/SDL_video.h> #include <SDL2/SDL_ttf.h> +#ifndef frame_delay +#define frame_delay 10 +#endif + int main(int argc, char *argv[]) { if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) @@ -67,7 +71,7 @@ int main(int argc, char *argv[]) stuff.my=e.button.y; } draw(window,&stuff); - SDL_Delay(10); + SDL_Delay(frame_delay); } on_end(&stuff); |
