Browse Source

Removed first mouse movement workaraound

Thomas Buck 10 years ago
parent
commit
0cf6616d97
2 changed files with 1 additions and 7 deletions
  1. 0
    1
      include/SDLSystem.h
  2. 1
    6
      src/SDLSystem.cpp

+ 0
- 1
include/SDLSystem.h View File

117
     void toggleFullscreen();
117
     void toggleFullscreen();
118
 
118
 
119
 protected:
119
 protected:
120
-    bool mFirstMouseEvent; //!< Filter first mouse event (SDL bug)
121
     bool mFullscreen;      //!< Current Fullscreen/Windowed mode
120
     bool mFullscreen;      //!< Current Fullscreen/Windowed mode
122
 
121
 
123
 private:
122
 private:

+ 1
- 6
src/SDLSystem.cpp View File

26
     mWindow = 0x0;
26
     mWindow = 0x0;
27
     gWidth = &m_width;
27
     gWidth = &m_width;
28
     gHeight = &m_height;
28
     gHeight = &m_height;
29
-    mFirstMouseEvent = false;
30
     mFullscreen = false;
29
     mFullscreen = false;
31
 }
30
 }
32
 
31
 
151
                     break;
150
                     break;
152
                 case SDL_MOUSEMOTION:
151
                 case SDL_MOUSEMOTION:
153
                     // Wrap motion
152
                     // Wrap motion
154
-                    if (!mFirstMouseEvent) {
155
-                        mFirstMouseEvent = true;
156
-                    } else {
157
-                        handleMouseMotionEvent(event.motion.xrel/2, event.motion.yrel/2);
158
-                    }
153
+                    handleMouseMotionEvent(event.motion.xrel / 2, event.motion.yrel / 2);
159
                     break;
154
                     break;
160
                 case SDL_MOUSEBUTTONDOWN:
155
                 case SDL_MOUSEBUTTONDOWN:
161
                 case SDL_MOUSEBUTTONUP:
156
                 case SDL_MOUSEBUTTONUP:

Loading…
Cancel
Save