mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 10:09:32 +01:00
Kitkat Immersive Mode. Need to upgrade the buildbot before we can merge this.
This commit is contained in:
1 parent
127d4b2d20
commit
d7e3173f55
4 files changed
+17
-3
No files matched your search
@@ -4,7 +4,7 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
|
||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" />
|
||||
|
||||
<application
|
||||
android:icon="@drawable/ic_launcher" >
|
||||
|
||||
@@ -153,7 +153,9 @@ extern "C" void OpenSLWrap_Shutdown() {
|
||||
SLresult result;
|
||||
ILOG("OpenSLWrap_Shutdown - stopping playback");
|
||||
result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_STOPPED);
|
||||
assert(SL_RESULT_SUCCESS == result);
|
||||
if (SL_RESULT_SUCCESS != result) {
|
||||
ELOG("SetPlayState failed");
|
||||
}
|
||||
|
||||
ILOG("OpenSLWrap_Shutdown - deleting player object");
|
||||
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
#proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-17
|
||||
target=android-19
|
||||
android.library=true
|
||||
@@ -313,6 +313,9 @@ public class NativeActivity extends Activity {
|
||||
if (Build.VERSION.SDK_INT >= 14) {
|
||||
darkenOnScreenButtons();
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
setImmersiveMode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -339,6 +342,12 @@ public class NativeActivity extends Activity {
|
||||
public void darkenOnScreenButtons() {
|
||||
mGLSurfaceView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.KITKAT)
|
||||
public void setImmersiveMode() {
|
||||
this.setImmersive(true); // This is an entirely different kind of immersive mode - hides some notification
|
||||
mGLSurfaceView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
|
||||
}
|
||||
|
||||
private boolean detectOpenGLES20() {
|
||||
ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
|
||||
@@ -385,6 +394,9 @@ public class NativeActivity extends Activity {
|
||||
if (Build.VERSION.SDK_INT >= 14) {
|
||||
darkenOnScreenButtons();
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
setImmersiveMode();
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent destroying and recreating the main activity when the device rotates etc,
|
||||
|
||||
Reference in new issue
Block a user