aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ray.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/ray.c b/src/ray.c
index 1a7d01c..298be85 100644
--- a/src/ray.c
+++ b/src/ray.c
@@ -16,7 +16,6 @@
*/
#include "config.h"
-#include <limits.h>
#include <raylib.h>
#include <stdio.h>
#include <stdlib.h>
@@ -105,7 +104,15 @@ read_input(void)
if (IsKeyPressed(KEY_ENTER))
{
TraceLog(LOG_INFO, "enter key pressed");
- return INT_MAX;
+ return DISP_QUIT;
+ }
+ if (IsKeyPressed(KEY_Q))
+ {
+ return DISP_QUIT;
+ }
+ if (IsKeyPressed(KEY_R) || IsKeyPressed(KEY_G))
+ {
+ return DISP_RELOAD;
}
/* EndDrawing(); */
}
@@ -123,3 +130,19 @@ destroy(void)
{
CloseWindow();
}
+
+#ifndef NDEBUG
+void *
+pre_reload(void)
+{
+ TraceLog(LOG_INFO, "pre-reload actions done");
+ return NULL;
+}
+
+void
+post_reload(void *state)
+{
+ (void) state;
+ TraceLog(LOG_INFO, "post-reload actions done");
+}
+#endif