Skip to content

Commit

Permalink
Crashfix on older devices
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Aug 17, 2017
1 parent d60bb27 commit d65547e
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions android/src/org/ppsspp/ppsspp/NativeActivity.java
Expand Up @@ -292,16 +292,18 @@ public void Initialize() {


@TargetApi(24) @TargetApi(24)
private void updateSustainedPerformanceMode() { private void updateSustainedPerformanceMode() {
// Query the native application on the desired rotation. if (sustainedPerfSupported) {
int enable = 0; // Query the native application on the desired rotation.
String str = NativeApp.queryConfig("sustainedPerformanceMode"); int enable = 0;
try { String str = NativeApp.queryConfig("sustainedPerformanceMode");
enable = Integer.parseInt(str); try {
} catch (NumberFormatException e) { enable = Integer.parseInt(str);
Log.e(TAG, "Invalid perf mode: " + str); } catch (NumberFormatException e) {
return; Log.e(TAG, "Invalid perf mode: " + str);
return;
}
getWindow().setSustainedPerformanceMode(enable != 0);
} }
getWindow().setSustainedPerformanceMode(enable != 0);
} }


@TargetApi(9) @TargetApi(9)
Expand Down

0 comments on commit d65547e

Please sign in to comment.