summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2020-03-03 16:10:31 +0100
committerRay <[email protected]>2020-03-03 16:10:31 +0100
commitdc2e5c17511e520250cbf73e4dd8a4b08fb7b082 (patch)
treee7295b5750146cd95b2b9140c16d67559d11de52 /src
parent645a5b2507ca98970fdcb22d0e6acd1fcd4f6974 (diff)
downloadraylib-dc2e5c17511e520250cbf73e4dd8a4b08fb7b082.tar.gz
raylib-dc2e5c17511e520250cbf73e4dd8a4b08fb7b082.zip
Update core.c
Diffstat (limited to 'src')
-rw-r--r--src/core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core.c b/src/core.c
index d5308c7d..8981799a 100644
--- a/src/core.c
+++ b/src/core.c
@@ -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;