diff options
| author | Ray <[email protected]> | 2020-03-03 16:10:31 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-03-03 16:10:31 +0100 |
| commit | dc2e5c17511e520250cbf73e4dd8a4b08fb7b082 (patch) | |
| tree | e7295b5750146cd95b2b9140c16d67559d11de52 /src | |
| parent | 645a5b2507ca98970fdcb22d0e6acd1fcd4f6974 (diff) | |
| download | raylib-dc2e5c17511e520250cbf73e4dd8a4b08fb7b082.tar.gz raylib-dc2e5c17511e520250cbf73e4dd8a4b08fb7b082.zip | |
Update core.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -445,7 +445,7 @@ typedef struct CoreData { //---------------------------------------------------------------------------------- static CoreData CORE = { 0 }; // Global CORE context -static char **dirFilesPath; // Store directory files paths as strings +static char **dirFilesPath = NULL; // Store directory files paths as strings static int dirFilesCount = 0; // Count directory files strings #if defined(SUPPORT_SCREEN_CAPTURE) @@ -2306,7 +2306,7 @@ bool IsKeyPressed(int key) { bool pressed = false; - if ((CORE.Input.Keyboard.currentKeyState[key] != CORE.Input.Keyboard.previousKeyState[key]) && (CORE.Input.Keyboard.currentKeyState[key] == 1)) pressed = true; + if ((CORE.Input.Keyboard.previousKeyState[key] == 0) && (CORE.Input.Keyboard.currentKeyState[key] == 1)) pressed = true; else pressed = false; return pressed; @@ -2324,7 +2324,7 @@ bool IsKeyReleased(int key) { bool released = false; - if ((CORE.Input.Keyboard.currentKeyState[key] != CORE.Input.Keyboard.previousKeyState[key]) && (CORE.Input.Keyboard.currentKeyState[key] == 0)) released = true; + if ((CORE.Input.Keyboard.previousKeyState[key] == 1) && (CORE.Input.Keyboard.currentKeyState[key] == 0)) released = true; else released = false; return released; |
