fix many things and make playable

This commit is contained in:
Kolyah35
2026-03-03 02:25:34 +03:00
parent 13010f10fa
commit fd183d4888
8 changed files with 52 additions and 30 deletions

View File

@@ -5,6 +5,10 @@
#include <SDL/SDL.h>
#endif
#ifdef PLATFORM_GLFW
#include <GLFW/glfw3.h>
#endif
MouseHandler::MouseHandler( ITurnInput* turnInput )
: _turnInput(turnInput)
{}
@@ -29,6 +33,10 @@ void MouseHandler::grab() {
SDL_WM_GrabInput(SDL_GRAB_ON);
SDL_ShowCursor(0);
#endif
#ifdef PLATFORM_GLFW
glfwSetInputMode(glfwGetCurrentContext(), GLFW_CURSOR, GLFW_CURSOR_DISABLED);
#endif
}
void MouseHandler::release() {
@@ -37,6 +45,10 @@ void MouseHandler::release() {
SDL_WM_GrabInput(SDL_GRAB_OFF);
SDL_ShowCursor(1);
#endif
#ifdef PLATFORM_GLFW
glfwSetInputMode(glfwGetCurrentContext(), GLFW_CURSOR, GLFW_CURSOR_NORMAL);
#endif
}
void MouseHandler::poll() {