From 7770b1a82beac5aca785a30eaeb64123bc6872a4 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sat, 28 Sep 2019 19:33:57 +0700 Subject: [PATCH] input: improve touch emulation --- engine/client/input.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/client/input.c b/engine/client/input.c index 4b251c1e..fae98026 100644 --- a/engine/client/input.c +++ b/engine/client/input.c @@ -362,7 +362,12 @@ void IN_MouseEvent( void ) // touch emu: handle motion if( CVAR_TO_BOOL( touch_emulate )) - Touch_KeyEvent( K_MOUSE1, 2 ); + { + if( Key_IsDown( K_SHIFT ) ) + Touch_KeyEvent( K_MOUSE2, 2 ); + else + Touch_KeyEvent( K_MOUSE1, 2 ); + } if( !in_mouseinitialized || !in_mouseactive ) return;