/* 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. */ #ifndef XASH_DEDICATED #include "common.h" #include "client.h" #include "mobility_int.h" #include "library.h" #include "gl_local.h" #include "input.h" #if defined(__ANDROID__) #include "platform/android/android-main.h" #endif 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 ) { MsgDev( D_WARN, "Negative vibrate time: %f\n", life ); return; } //MsgDev( D_NOTE, "Vibrate: %f %d\n", life, flags ); // here goes platform-specific backends #ifdef __ANDROID__ Android_Vibrate( life * vibration_length->value, flags ); #endif } static void Vibrate_f() { if( Cmd_Argc() != 2 ) { Msg( S_USAGE "vibrate