Skip to content

Commit

Permalink
Disable opengl by default for 32 bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
Chumva committed Dec 5, 2024
1 parent 09a03ae commit 915484f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions OsmAnd/src/net/osmand/plus/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,9 @@ public static long getInstallTime(@NonNull OsmandApplication app) {
public static long getUpdateTime(@NonNull OsmandApplication app) {
return app.getAppInitializer().getUpdateVersionTime();
}

public static boolean is32BitSystem() {
String primaryAbi = Build.SUPPORTED_ABIS.length > 0 ? Build.SUPPORTED_ABIS[0] : null;
return CollectionUtils.equalsToAny(primaryAbi, "armeabi-v7a", "x86", "armeabi");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3172,7 +3172,10 @@ public CommonPreference<Boolean> getCustomRoutingBooleanProperty(String attrName

public final CommonPreference<Integer> LOCATION_INTERPOLATION_PERCENT = new IntPreference(this, "location_interpolation_percent", 0).makeGlobal().makeShared();

public final OsmandPreference<Boolean> USE_OPENGL_RENDER = new BooleanPreference(this, "use_opengl_render", Build.VERSION.SDK_INT >= Build.VERSION_CODES.P).makeGlobal().makeShared().cache();
public final OsmandPreference<Boolean> USE_OPENGL_RENDER = new BooleanPreference(this, "use_opengl_render",
Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && !Version.is32BitSystem()
).makeGlobal().makeShared().cache();

public final OsmandPreference<Integer> OPENGL_RENDER_FAILED = new IntPreference(this, "opengl_render_failed_count", 0).makeGlobal().cache();

public final OsmandPreference<String> CONTRIBUTION_INSTALL_APP_DATE = new StringPreference(this, "CONTRIBUTION_INSTALL_APP_DATE", null).makeGlobal();
Expand Down

0 comments on commit 915484f

Please sign in to comment.