Browse Source

Make cursor visible when disabling mousegrab

Thomas Buck 10 years ago
parent
commit
9dcd190664
2 changed files with 3 additions and 0 deletions
  1. 1
    0
      ChangeLog
  2. 2
    0
      src/SDLSystem.cpp

+ 1
- 0
ChangeLog View File

8
 	[ 20140312 ]
8
 	[ 20140312 ]
9
 	* Resizing the window works properly (except for fixed string positions)
9
 	* Resizing the window works properly (except for fixed string positions)
10
 	* Removed FullScreen config command and flag that had no effect
10
 	* Removed FullScreen config command and flag that had no effect
11
+	* Set cursor visible when disabling mousegrab
11
 
12
 
12
 	[ 20140311 ]
13
 	[ 20140311 ]
13
 	* Removed empty Camera, Matrix, Particle, Quaternion,
14
 	* Removed empty Camera, Matrix, Particle, Quaternion,

+ 2
- 0
src/SDLSystem.cpp View File

49
 
49
 
50
 void SDLSystem::setGrabMouse(bool on) {
50
 void SDLSystem::setGrabMouse(bool on) {
51
     SDL_SetRelativeMouseMode(on ? SDL_TRUE : SDL_FALSE);
51
     SDL_SetRelativeMouseMode(on ? SDL_TRUE : SDL_FALSE);
52
+    if (!on)
53
+        SDL_ShowCursor(1);
52
 }
54
 }
53
 
55
 
54
 void SDLSystem::initVideo(unsigned int width, unsigned int height, bool fullscreen) {
56
 void SDLSystem::initVideo(unsigned int width, unsigned int height, bool fullscreen) {

Loading…
Cancel
Save