diff --git a/android/src/in/celest/xash3d/cs16client/LauncherActivity.java b/android/src/in/celest/xash3d/cs16client/LauncherActivity.java index 8d098c4..dce1d91 100644 --- a/android/src/in/celest/xash3d/cs16client/LauncherActivity.java +++ b/android/src/in/celest/xash3d/cs16client/LauncherActivity.java @@ -49,6 +49,7 @@ import android.widget.TabHost; import android.os.Environment; import android.os.Build; import android.net.Uri; +import android.util.DisplayMetrics; import java.io.FileOutputStream; import java.io.File; import java.io.InputStream; @@ -191,8 +192,10 @@ public class LauncherActivity extends Activity { // Check myself for GP version argv = argv + " -noch"; - if( mFirstTime ) + if( mFirstTime ) + { argv = argv + " -firsttime umu"; // pass argument, because xash have a bug related to client's CheckParm + } Intent intent = new Intent(); intent.setAction("in.celest.xash3d.START"); diff --git a/cl_dll/hud/hud.cpp b/cl_dll/hud/hud.cpp index a77f36c..ee04234 100644 --- a/cl_dll/hud/hud.cpp +++ b/cl_dll/hud/hud.cpp @@ -263,15 +263,6 @@ void CHud :: Init( void ) gEngfuncs.Cvar_SetValue( "hud_fastswitch", 1 ); #endif - if( g_iMobileAPIVersion ) - { - if( gEngfuncs.CheckParm( "-firsttime", NULL ) ) - { - ClientCmd( "touch_presets/phone_ahsim.cfg" ); - } - } - - MsgFunc_ResetHUD(0, 0, NULL ); } @@ -294,6 +285,7 @@ CHud :: ~CHud() void CHud :: VidInit( void ) { + static bool firstinit = true; m_scrinfo.iSize = sizeof( m_scrinfo ); GetScreenInfo( &m_scrinfo ); @@ -444,6 +436,16 @@ void CHud :: VidInit( void ) for( HUDLIST *pList = m_pHudList; pList; pList = pList->pNext ) pList->p->VidInit(); + + if( firstinit && gEngfuncs.CheckParm( "-firsttime", NULL ) ) + { + ConsolePrint( "firstrun\n" ); + + ClientCmd( "exec touch_presets/phone_ahsim" ); + gEngfuncs.Cvar_Set( "touch_config_file", "touch_presets/phone_ahsim.cfg" ); + } + + firstinit = false; } void CHud::Shutdown( void )