/* cl_mobile.c - common mobile interface Copyright (C) 2015 a1batross This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ #include "common.h" #include "client.h" #include "mobility_int.h" #include "library.h" #include "input.h" #include "platform/platform.h" mobile_engfuncs_t *gMobileEngfuncs; convar_t *vibration_length; convar_t *vibration_enable; static void pfnVibrate( float life, char flags ) { if( !vibration_enable->value ) return; if( life < 0.0f ) { Con_Reportf( S_WARN "Negative vibrate time: %f\n", life ); return; } //Con_Reportf( "Vibrate: %f %d\n", life, flags ); // here goes platform-specific backends Platform_Vibrate( life * vibration_length->value, flags ); } static void Vibrate_f( void ) { if( Cmd_Argc() != 2 ) { Msg( S_USAGE "vibrate