mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-23 11:31:33 +01:00
DroidFish: Don't process scroll events if chess board square size is zero.
This commit is contained in:
parent
ec8e082d5f
commit
e547c780c9
|
@ -89,7 +89,6 @@ import android.view.View.OnClickListener;
|
|||
import android.view.View.OnKeyListener;
|
||||
import android.view.View.OnLongClickListener;
|
||||
import android.view.View.OnTouchListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
|
@ -325,7 +324,7 @@ public class DroidFish extends Activity implements GUIInterface {
|
|||
distanceX = -distanceX;
|
||||
distanceY = -distanceY;
|
||||
}
|
||||
if (scrollSensitivity > 0) {
|
||||
if ((scrollSensitivity > 0) && (cb.sqSize > 0)) {
|
||||
scrollX += distanceX;
|
||||
scrollY += distanceY;
|
||||
float scrollUnit = cb.sqSize * scrollSensitivity;
|
||||
|
|
Loading…
Reference in New Issue
Block a user