Pārlūkot izejas kodu

Make cursor visible when disabling mousegrab

Thomas Buck 10 gadus atpakaļ
vecāks
revīzija
9dcd190664
2 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 1
    0
      ChangeLog
  2. 2
    0
      src/SDLSystem.cpp

+ 1
- 0
ChangeLog Parādīt failu

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

+ 2
- 0
src/SDLSystem.cpp Parādīt failu

@@ -49,6 +49,8 @@ void SDLSystem::bindKeyCommand(const char *cmd, int key, int event) {
49 49
 
50 50
 void SDLSystem::setGrabMouse(bool on) {
51 51
     SDL_SetRelativeMouseMode(on ? SDL_TRUE : SDL_FALSE);
52
+    if (!on)
53
+        SDL_ShowCursor(1);
52 54
 }
53 55
 
54 56
 void SDLSystem::initVideo(unsigned int width, unsigned int height, bool fullscreen) {

Notiek ielāde…
Atcelt
Saglabāt