Fix fullscreen
This commit is contained in:
parent
441beea431
commit
5b0ee9679c
1 changed files with 14 additions and 3 deletions
|
@ -50,8 +50,19 @@ public class XashActivity extends Activity {
|
||||||
// So we can call stuff from static callbacks
|
// So we can call stuff from static callbacks
|
||||||
mSingleton = this;
|
mSingleton = this;
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
// mArgv = intent.getStringExtra(in.celest.xash3d.LauncherActivity.ARGV);
|
|
||||||
// Set up the surface
|
// fullscreen
|
||||||
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
if(sdk >= 12) {
|
||||||
|
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||||
|
WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
// keep screen on
|
||||||
|
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
|
||||||
|
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
|
||||||
|
// Set up the surface
|
||||||
mSurface = new EngineSurface(getApplication());
|
mSurface = new EngineSurface(getApplication());
|
||||||
setContentView(mSurface);
|
setContentView(mSurface);
|
||||||
SurfaceHolder holder = mSurface.getHolder();
|
SurfaceHolder holder = mSurface.getHolder();
|
||||||
|
@ -76,7 +87,7 @@ public class XashActivity extends Activity {
|
||||||
setenv("XASH3D_GAMELIBDIR", gamelibdir, true);
|
setenv("XASH3D_GAMELIBDIR", gamelibdir, true);
|
||||||
setenv("XASH3D_GAMEDIR", gamedir, true);
|
setenv("XASH3D_GAMEDIR", gamedir, true);
|
||||||
|
|
||||||
//extractPAK(this, false);
|
InstallReceiver.extractPAK(this, false);
|
||||||
setenv("XASH3D_EXTRAS_PAK1", getFilesDir().getPath() + "/extras.pak", true);
|
setenv("XASH3D_EXTRAS_PAK1", getFilesDir().getPath() + "/extras.pak", true);
|
||||||
String pakfile = intent.getStringExtra("pakfile");
|
String pakfile = intent.getStringExtra("pakfile");
|
||||||
if( pakfile != null && pakfile != "" )
|
if( pakfile != null && pakfile != "" )
|
||||||
|
|
Loading…
Add table
Reference in a new issue