From e1c6396e259a164f57dec9ca6569cb29010a12fc Mon Sep 17 00:00:00 2001 From: Charadon Date: Tue, 31 May 2022 02:10:48 -0400 Subject: Fixed issue where window segfaulted when resized. --- Makefile | 2 +- net.iotib.Pong.yml | 12 ++++++++++-- raylib | 2 +- src/pong.h | 1 + src/title.c | 3 +-- 5 files changed, 14 insertions(+), 6 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 index 0851960..b6c8d34 160000 --- a/raylib +++ b/raylib @@ -1 +1 @@ -Subproject commit 0851960397f02a477d80eda2239f90fae14dec64 +Subproject commit b6c8d343dca2ef19c23c50975328a028124cf3cb 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 #include 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); -- cgit 1.4.1-2-gfad0