From 815aa9048974e6c82a63ff2aa21fdf4ef13824da Mon Sep 17 00:00:00 2001 From: zebra Date: Tue, 8 Nov 2022 10:51:13 +0300 Subject: [PATCH] func name fix --- src/voxel_engine.cpp | 4 ++-- src/window/Events.cpp | 2 +- src/window/Events.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/voxel_engine.cpp b/src/voxel_engine.cpp index bfb13c67..99c95676 100644 --- a/src/voxel_engine.cpp +++ b/src/voxel_engine.cpp @@ -120,7 +120,7 @@ void mainloop(Level* level, Assets* assets) { float delta = 0.0f; bool occlusion = true; bool devdata = false; - Window::swapInterval(1); + Window::swapInterval(0); while (!Window::isShouldClose()){ frame++; float currentTime = glfwGetTime(); @@ -131,7 +131,7 @@ void mainloop(Level* level, Assets* assets) { Window::setShouldClose(true); } if (Events::jpressed(GLFW_KEY_TAB)){ - Events::toogleCursor(); + Events::toggleCursor(); } if (Events::jpressed(GLFW_KEY_O)){ occlusion = !occlusion; diff --git a/src/window/Events.cpp b/src/window/Events.cpp index 18d0e0b0..13327b3b 100644 --- a/src/window/Events.cpp +++ b/src/window/Events.cpp @@ -97,7 +97,7 @@ bool Events::jclicked(int button){ return _keys[index] && _frames[index] == _current; } -void Events::toogleCursor(){ +void Events::toggleCursor(){ _cursor_locked = !_cursor_locked; Window::setCursorMode(_cursor_locked ? GLFW_CURSOR_DISABLED : GLFW_CURSOR_NORMAL); } diff --git a/src/window/Events.h b/src/window/Events.h index 996d4a03..d2a92c26 100644 --- a/src/window/Events.h +++ b/src/window/Events.h @@ -27,7 +27,7 @@ public: static bool clicked(int button); static bool jclicked(int button); - static void toogleCursor(); + static void toggleCursor(); }; #endif /* WINDOW_EVENTS_H_ */