mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Android: remove hard-coded constant for Samsung DeX (no op!)
12290 = 0x3002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN SOURCE_MOUSE Constant Value: 8194 (0x00002002) SOURCE_TOUCHSCREEN Constant Value: 4098 (0x00001002) SOURCE_CLASS_POINTER Constant Value: 2 (0x00000002) https://developer.android.com/reference/android/view/InputDevice.html
This commit is contained in:
parent
e5f8801f55
commit
8f828a8e1b
@ -1770,7 +1770,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
||||
float x,y,p;
|
||||
|
||||
// 12290 = Samsung DeX mode desktop mouse
|
||||
if ((event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == 12290) && SDLActivity.mSeparateMouseAndTouch) {
|
||||
// 12290 = 0x3002 = 0x2002 | 0x1002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN
|
||||
// 0x2 = SOURCE_CLASS_POINTER
|
||||
if ((event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == (InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN))
|
||||
&& SDLActivity.mSeparateMouseAndTouch) {
|
||||
try {
|
||||
mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
|
||||
} catch(Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user