From 9b418521af917533dc4c3f98e805eed989d455ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20L=C3=BCbe=C3=9F?= Date: Mon, 19 Jul 2021 20:07:30 +0200 Subject: [PATCH] Fixed WasKeyPressed and WasKeyReleased --- GlitchyEngine/src/Platform/Windows/WindowsInput.bf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GlitchyEngine/src/Platform/Windows/WindowsInput.bf b/GlitchyEngine/src/Platform/Windows/WindowsInput.bf index 711b92a..5482d47 100644 --- a/GlitchyEngine/src/Platform/Windows/WindowsInput.bf +++ b/GlitchyEngine/src/Platform/Windows/WindowsInput.bf @@ -51,13 +51,13 @@ namespace GlitchyEngine // public override static bool WasKeyPressed(Key keycode) { - int8 state = CurrentState.KeyStates[(int)keycode]; + int8 state = LastState.KeyStates[(int)keycode]; return state < 0; } public override static bool WasKeyReleased(Key keycode) { - int8 state = CurrentState.KeyStates[(int)keycode]; + int8 state = LastState.KeyStates[(int)keycode]; return state >= 0; }