aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh4
-rw-r--r--lib/init.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index e005808..bfc4527 100755
--- a/build.sh
+++ b/build.sh
@@ -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
diff --git a/lib/init.c b/lib/init.c
index 7d5a5e7..abe36d8 100644
--- a/lib/init.c
+++ b/lib/init.c
@@ -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);