Permalink
Browse files

Crashfix on older devices

  • Loading branch information...
hrydgard committed Aug 17, 2017
1 parent d60bb27 commit d65547edb54eea7e03907d6fd1f45d7073933bed
Showing with 11 additions and 9 deletions.
  1. +11 −9 android/src/org/ppsspp/ppsspp/NativeActivity.java
@@ -292,16 +292,18 @@ public void Initialize() {
@TargetApi(24)
private void updateSustainedPerformanceMode() {
// Query the native application on the desired rotation.
int enable = 0;
String str = NativeApp.queryConfig("sustainedPerformanceMode");
try {
enable = Integer.parseInt(str);
} catch (NumberFormatException e) {
Log.e(TAG, "Invalid perf mode: " + str);
return;
if (sustainedPerfSupported) {
// Query the native application on the desired rotation.
int enable = 0;
String str = NativeApp.queryConfig("sustainedPerformanceMode");
try {
enable = Integer.parseInt(str);
} catch (NumberFormatException e) {
Log.e(TAG, "Invalid perf mode: " + str);
return;
}
getWindow().setSustainedPerformanceMode(enable != 0);
}
getWindow().setSustainedPerformanceMode(enable != 0);
}
@TargetApi(9)

0 comments on commit d65547e

Please sign in to comment.