summary refs log tree commit diff stats
path: root/src
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 /src
parentcb42de03854921addb450e6a67cbe44dc9449ec0 (diff)
downloadPong-C-e1c6396e259a164f57dec9ca6569cb29010a12fc.tar.gz
Fixed issue where window segfaulted when resized.
Diffstat (limited to 'src')
-rw-r--r--src/pong.h1
-rw-r--r--src/title.c3
2 files changed, 2 insertions, 2 deletions
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);