|
@@ -130,6 +130,7 @@ SDLSystem::SDLSystem() : System()
|
130
|
130
|
mWindow = 0x0;
|
131
|
131
|
gWidth = &m_width;
|
132
|
132
|
gHeight = &m_height;
|
|
133
|
+ mFirstMouseEvent = false;
|
133
|
134
|
}
|
134
|
135
|
|
135
|
136
|
|
|
@@ -340,7 +341,11 @@ void SDLSystem::runGame()
|
340
|
341
|
break;
|
341
|
342
|
case SDL_MOUSEMOTION:
|
342
|
343
|
// Wrap motion
|
343
|
|
- handleMouseMotionEvent(event.motion.xrel/2, -event.motion.yrel/2);
|
|
344
|
+ if (!mFirstMouseEvent) {
|
|
345
|
+ mFirstMouseEvent = true;
|
|
346
|
+ } else {
|
|
347
|
+ handleMouseMotionEvent(event.motion.xrel/2, event.motion.yrel/2);
|
|
348
|
+ }
|
344
|
349
|
break;
|
345
|
350
|
case SDL_MOUSEBUTTONDOWN:
|
346
|
351
|
case SDL_MOUSEBUTTONUP:
|