diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 4802008..47bdb2f 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="406" + android:versionName="1.31"> maxScale || currentScale == invalidScale ) + if( currentScale > maxScale || + ( currentScale == invalidScale && + currentScale != 1.0f && + currentScale != 0.0f && + invalidScale < 1.0f ) ) { gEngfuncs.Cvar_SetValue( "hud_scale", maxScale ); gEngfuncs.Con_Printf("^3Maximum scale factor reached. Reset: %f\n", maxScale ); diff --git a/cl_dll/input_xash3d.cpp b/cl_dll/input_xash3d.cpp index a7fe46e..fbf7e23 100644 --- a/cl_dll/input_xash3d.cpp +++ b/cl_dll/input_xash3d.cpp @@ -12,6 +12,7 @@ cvar_t *cl_laddermode; cvar_t *sensitivity; cvar_t *in_joystick; +cvar_t *evdev_grab; float ac_forwardmove; @@ -126,9 +127,12 @@ void IN_ClientMoveEvent( float forwardmove, float sidemove ) void IN_ClientLookEvent( float relyaw, float relpitch ) { + if( ( evdev_grab && evdev_grab->value != 0.0f ) || bMouseInUse ) return; + rel_yaw += relyaw; rel_pitch += relpitch; } + // Rotate camera and add move values to usercmd void IN_Move( float frametime, usercmd_t *cmd ) { @@ -278,7 +282,9 @@ void IN_Init( void ) sensitivity = gEngfuncs.pfnRegisterVariable ( "sensitivity", "3", FCVAR_ARCHIVE ); in_joystick = gEngfuncs.pfnRegisterVariable ( "joystick", "0", FCVAR_ARCHIVE ); cl_laddermode = gEngfuncs.pfnRegisterVariable ( "cl_laddermode", "2", FCVAR_ARCHIVE ); - + evdev_grab = gEngfuncs.pfnGetCvarPointer("evdev_grab"); + + #ifdef __ANDROID__ gEngfuncs.Cvar_SetValue("m_yaw", -1); gEngfuncs.Cvar_SetValue("m_pitch", -1); diff --git a/mainui/basemenu.cpp b/mainui/basemenu.cpp index 3c8522a..549d994 100644 --- a/mainui/basemenu.cpp +++ b/mainui/basemenu.cpp @@ -1717,6 +1717,10 @@ void UI_Init( void ) Cmd_AddCommand( "menu_playdemo", UI_PlayDemo_Menu ); Cmd_AddCommand( "menu_recdemo", UI_RecDemo_Menu ); +#ifdef __ANDROID__ + Cmd_RemoveCommand( "evdev_mouseopen" ); + Cmd_RemoveCommand( "evdev_mouseclose" ); +#endif CHECK_MAP_LIST( TRUE );