Author: alink
Date: Wed Apr 18 16:18:22 2007
New Revision: 16899

URL: http://svn.gna.org/viewcvs/wesnoth?rev=16899&view=rev
Log:
Initialisation of some variables, just in case of SDL_GetMouseState 
forget to update these.

Modified:
    trunk/src/mouse_events.cpp

Modified: trunk/src/mouse_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/mouse_events.cpp?rev=16899&r1=16898&r2=16899&view=diff
==============================================================================
--- trunk/src/mouse_events.cpp (original)
+++ trunk/src/mouse_events.cpp Wed Apr 18 16:18:22 2007
@@ -741,7 +741,8 @@
 
        // Fire the drag & drop only after minimal drag distance
        // While we check the mouse buttons state, we also grab fresh position 
data.
-       int mx,my;
+       int mx = drag_from_x_; // some default value to prevent unlikely SDL bug
+       int my = drag_from_y_;
        if (dragging_ && !dragging_started_ && (SDL_GetMouseState(&mx,&my) & 
SDL_BUTTON(1) != 0)) {
                const int drag_distance = maximum<int>(abs(drag_from_x_- mx), 
abs(drag_from_y_- my));
                if (drag_distance > 10) {


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to