diff options
Diffstat (limited to 'src/ray.c')
-rw-r--r-- | src/ray.c | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -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 |