diff options
Diffstat (limited to 'src/rcore.c')
| -rw-r--r-- | src/rcore.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rcore.c b/src/rcore.c index b7a96938..4d0883f2 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -179,7 +179,7 @@ #include <stdlib.h> // Required for: srand(), rand(), atexit() #include <stdio.h> // Required for: sprintf() [Used in OpenURL()] -#include <string.h> // Required for: strrchr(), strcmp(), strlen() +#include <string.h> // Required for: strrchr(), strcmp(), strlen(), memset() #include <time.h> // Required for: time() [Used in InitTimer()] #include <math.h> // Required for: tan() [Used in BeginMode3D()], atan2f() [Used in LoadVrStereoConfig()] @@ -754,8 +754,9 @@ void InitWindow(int width, int height, const char *title) #endif if ((title != NULL) && (title[0] != 0)) CORE.Window.title = title; - - // Initialize required global values different than 0 + + // Initialize global input state + memset(&CORE.Input, 0, sizeof(CORE.Input)); CORE.Input.Keyboard.exitKey = KEY_ESCAPE; CORE.Input.Mouse.scale = (Vector2){ 1.0f, 1.0f }; CORE.Input.Mouse.cursor = MOUSE_CURSOR_ARROW; |
