about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCharadon <dev@iotib.net>2022-08-04 12:23:06 -0400
committerCharadon <dev@iotib.net>2022-08-04 12:23:06 -0400
commite0e2026448b62e00186689d51a4fd3da8c242a5a (patch)
tree2079abd3dbf57a1d74e2e1bc2a9f9a5f495e9634
parent170c83ae7f87676274508a0974737a0a39dec08b (diff)
downloadPong-C-e0e2026448b62e00186689d51a4fd3da8c242a5a.tar.gz
Fixed issue for haiku where 2 BApplications instances would crash the game, and fixed install script so it works on Mac
-rw-r--r--premake5.lua2
-rw-r--r--src/main.c2
-rw-r--r--src/pong.h1
3 files changed, 3 insertions, 2 deletions
diff --git a/premake5.lua b/premake5.lua
index 8f0d16d..a309bdd 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -10,7 +10,7 @@ project("Pong")
 		os.mkdir(string.format("%s/Pong/docs", prefix))
 	    os.executef("cp -r resources/* %s/Pong/resources/", prefix)
 		os.executef("cp -r docs/* %s/Pong/docs", prefix)
-        os.executef("install -m755 bin/*/Pong %s/Pong/pong", prefix)
+        os.executef("install -m755 bin/*/Pong* %s/Pong/", prefix)
         os.exit(0)
         end
     }
diff --git a/src/main.c b/src/main.c
index 54f5b1b..6b07e4e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -143,8 +143,8 @@ bool play_audio(int SoundEffect) {
 
 int main(int argc, char *argv[]) {
 	/* Raylib Init */
-	InitWindow(1280, 720, "Pong");
 	SDL_Init(SDL_INIT_AUDIO);
+	InitWindow(1280, 720, "Pong");
 	SDL_AtomicSet(&Ticks, 0);
 	SDL_Thread *InternalClock = SDL_CreateThread(internal_clock, "Internal Clock", NULL);
 	SetTargetFPS(60);
diff --git a/src/pong.h b/src/pong.h
index dd469f5..d0099d4 100644
--- a/src/pong.h
+++ b/src/pong.h
@@ -15,6 +15,7 @@
 #include <setjmp.h>
 #include <string.h>
 #include <stdint.h>
+#include <stdlib.h>
 
 #include "sounds.h"