mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-20 06:53:30 +00:00
fix many things and make playable
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user