Fix first run check

This commit is contained in:
a1batross 2016-12-10 01:39:49 +03:00
parent cd038a1125
commit 3f021e4dcd
2 changed files with 15 additions and 10 deletions

View File

@ -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");

View File

@ -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 )