about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCharadon <dev@iotib.net>2022-05-31 02:10:48 -0400
committerCharadon <dev@iotib.net>2022-05-31 02:10:48 -0400
commite1c6396e259a164f57dec9ca6569cb29010a12fc (patch)
tree0827e1d07daa2761033587eb69ae643961741f8c
parentcb42de03854921addb450e6a67cbe44dc9449ec0 (diff)
downloadPong-C-e1c6396e259a164f57dec9ca6569cb29010a12fc.tar.gz
Fixed issue where window segfaulted when resized.
-rw-r--r--Makefile2
-rw-r--r--net.iotib.Pong.yml12
m---------raylib0
-rw-r--r--src/pong.h1
-rw-r--r--src/title.c3
5 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 8f8e59f..7a06e58 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ LDFLAGS = -lGL -lm -lpthread -ldl -lrt -lX11
 all: build_deps build pong
 
 build_deps:
-	cd raylib/src && $(MAKE) PLATFORM=PLATFORM_DESKTOP
+	cd raylib/src && $(MAKE) PLATFORM=PLATFORM_DESKTOP RAYLIB_BUILD_MODE=RELEASE USE_EXTERNAL_GLFW=FALSE
 
 build: src/main.c src/enemy.c src/ball.c src/title.c
 	$(CC) $(CFLAGS) $(PKG_CONF_CFLAGS) -c $?
diff --git a/net.iotib.Pong.yml b/net.iotib.Pong.yml
index 5655c4b..3860cac 100644
--- a/net.iotib.Pong.yml
+++ b/net.iotib.Pong.yml
@@ -1,5 +1,7 @@
 app-id: net.iotib.Pong
-runtime: org.freedesktop.Platform
+branch: '0.1'
+appdata-license: 'GPL-3.0-only'
+runtime: org.freedesktop.Platform.GL.default
 runtime-version: '21.08'
 sdk: org.freedesktop.Sdk
 command: launch.sh
@@ -20,4 +22,10 @@ modules:
         dest: resources
       - type: dir
         path: raylib
-        dest: raylib
\ No newline at end of file
+        dest: raylib
+finish-args:
+  - --socket=x11
+  - --device=dri
+  - --share=ipc
+  - --socket=pulseaudio
+  - --socket=wayland
\ No newline at end of file
diff --git a/raylib b/raylib
-Subproject 0851960397f02a477d80eda2239f90fae14dec6
+Subproject b6c8d343dca2ef19c23c50975328a028124cf3c
diff --git a/src/pong.h b/src/pong.h
index ab74d07..fff6065 100644
--- a/src/pong.h
+++ b/src/pong.h
@@ -1,5 +1,6 @@
 #ifndef PONG_H
 #define PONG_H
+#define MOUSE_LEFT_BUTTON MOUSE_BUTTON_LEFT
 #include "raylib.h"
 #include <stdatomic.h>
 #include <stdio.h>
diff --git a/src/title.c b/src/title.c
index fd57c2e..806c0d0 100644
--- a/src/title.c
+++ b/src/title.c
@@ -38,7 +38,7 @@ void title_screen() {
         if (CheckCollisionRecs(Mouse, Versus)) {
             Selected = &Versus;
             if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) {
-                return;
+                return; 
             }
         } else if (CheckCollisionRecs(Mouse, Marathon)) {
             Selected = &Marathon;
@@ -53,7 +53,6 @@ void title_screen() {
                 return;
             }
         }
-        MainCamera.zoom = GetScreenHeight()/720.0f;
         BeginDrawing();
             ClearBackground(BLACK);
             BeginMode2D(MainCamera);