diff --git a/Video.cc b/Video.cc index c9606c6..7ebc981 100644 --- a/Video.cc +++ b/Video.cc @@ -26,6 +26,7 @@ Video::Video() } m_surface = NULL; + m_inputGrabbed = false; } void Video::start(int width, int height, bool fullscreen) @@ -42,6 +43,10 @@ void Video::start(int width, int height, bool fullscreen) SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); m_surface = SDL_SetVideoMode(width, height, 32, flags); + SDL_ShowCursor(SDL_DISABLE); + SDL_WM_GrabInput(SDL_GRAB_ON); + m_inputGrabbed = true; + m_fullscreen = fullscreen; } } diff --git a/Video.h b/Video.h index d196de3..849ebe3 100644 --- a/Video.h +++ b/Video.h @@ -19,6 +19,8 @@ class Video int m_defaultWidth; int m_defaultHeight; SDL_Surface * m_surface; + bool m_fullscreen; + bool m_inputGrabbed; }; #endif