SDL: option for desktop mouse mode / no touch filtering, added back backspace key handler hack to text input window

This commit is contained in:
Sergii Pylypenko
2017-01-27 22:24:08 +02:00
parent 1b8e4d3414
commit fc3265c289
8 changed files with 30 additions and 11 deletions

View File

@@ -106,8 +106,8 @@ abstract class DifferentTouchInput
public abstract void process(final MotionEvent event);
public abstract void processGenericEvent(final MotionEvent event);
public static int ExternalMouseDetected = 0;
public static int ExternalMouseDetected = Mouse.MOUSE_HW_INPUT_FINGER;
public static DifferentTouchInput touchInput = getInstance();
public static DifferentTouchInput getInstance()
@@ -315,8 +315,8 @@ abstract class DifferentTouchInput
}
public void process(final MotionEvent event)
{
int hwMouseEvent = ((event.getSource() & InputDevice.SOURCE_STYLUS) == InputDevice.SOURCE_STYLUS) ? Mouse.MOUSE_HW_INPUT_STYLUS :
((event.getSource() & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) ? Mouse.MOUSE_HW_INPUT_MOUSE :
int hwMouseEvent = ((event.getSource() & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE || Globals.ForceHardwareMouse) ? Mouse.MOUSE_HW_INPUT_MOUSE :
((event.getSource() & InputDevice.SOURCE_STYLUS) == InputDevice.SOURCE_STYLUS) ? Mouse.MOUSE_HW_INPUT_STYLUS :
Mouse.MOUSE_HW_INPUT_FINGER;
if( ExternalMouseDetected != hwMouseEvent )
{