diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 9009a21..705992d 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -2,7 +2,7 @@
-
+
\ No newline at end of file
diff --git a/Levels/Game.cpp b/Levels/Game.cpp
index 0209bda..8e4eed4 100644
--- a/Levels/Game.cpp
+++ b/Levels/Game.cpp
@@ -188,15 +188,17 @@ void Game::PostInitialize(lwe::GpuCmdBuffer* cmdBuffer)
// Post Initialization Code Here
}
-void Game::OnUpdate(lwe::Input* input, const float delta)
+void Game::OnUpdate(lwe::RenderWindow* win, lwe::Input* input, const float delta)
{
- Level::OnUpdate(input, delta);
+ Level::OnUpdate(win, input, delta);
// Update Code Here
- const lwe::GenericInputHandler* handler = (lwe::GenericInputHandler*)input->GetHandler("GenericInputHandler");
+ const lwe::InputHandler* ih = win->GetInputHandler();
- const lwe::Keyboard* keyboard = handler->GetPrimaryKeyboard();
+ const lwe::Keyboard* keyboard = (lwe::Keyboard*)ih->GetDeviceByType(LWE_HID_KEYBOARD);
+ if (!keyboard)
+ return;
lwe::Entity* bounds = GetEntity("Bounds");
diff --git a/Levels/Game.h b/Levels/Game.h
index 7f000f6..cbf4f2b 100644
--- a/Levels/Game.h
+++ b/Levels/Game.h
@@ -2,6 +2,7 @@
#include
#include
+#include
class Game : public lwe::Level
{
@@ -27,7 +28,7 @@ public:
void PostInitialize(lwe::GpuCmdBuffer* cmdBuffer) override;
- void OnUpdate(lwe::Input* input, const float delta) override;
+ void OnUpdate(lwe::RenderWindow* win, lwe::Input* input, const float delta) override;
void PreRender(lwe::GpuCmdBuffer* cmdBuffer) override;
diff --git a/Main.cpp b/Main.cpp
index 0a55e9a..6af4b58 100644
--- a/Main.cpp
+++ b/Main.cpp
@@ -48,7 +48,6 @@ lwe::SInt_32 Main(lwe::Str_8* appName, lwe::Str_8* appVerId, lwe::Version* appVe
win.Create_8(*appName, {0, 0}, {1024, 768});
lwe::GameLoop gl(&win, 6, 0);
- gl.GetInput()->AddHandler(new lwe::GenericInputHandler());
lwe::Frame* mainFrame = new lwe::Frame("Main");