Refactor application
This commit is contained in:
parent
538cf0d66d
commit
49344c4a90
1 changed files with 4 additions and 2 deletions
|
@ -558,13 +558,15 @@ public class OsmandApplication extends Application {
|
||||||
|
|
||||||
if (!"qnx".equals(System.getProperty("os.name"))) {
|
if (!"qnx".equals(System.getProperty("os.name"))) {
|
||||||
if (osmandSettings.USE_OPENGL_RENDER.get()) {
|
if (osmandSettings.USE_OPENGL_RENDER.get()) {
|
||||||
|
boolean success = false;
|
||||||
if (!osmandSettings.OPENGL_RENDER_FAILED.get()) {
|
if (!osmandSettings.OPENGL_RENDER_FAILED.get()) {
|
||||||
osmandSettings.OPENGL_RENDER_FAILED.set(true);
|
osmandSettings.OPENGL_RENDER_FAILED.set(true);
|
||||||
boolean success = NativeCoreContext.tryCatchInit(this);
|
success = NativeCoreContext.tryCatchInit(this);
|
||||||
if (success) {
|
if (success) {
|
||||||
osmandSettings.OPENGL_RENDER_FAILED.set(false);
|
osmandSettings.OPENGL_RENDER_FAILED.set(false);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
if (!success) {
|
||||||
// try next time once again ?
|
// try next time once again ?
|
||||||
osmandSettings.OPENGL_RENDER_FAILED.set(false);
|
osmandSettings.OPENGL_RENDER_FAILED.set(false);
|
||||||
warnings.add("Native OpenGL library is not supported. Please try again after exit");
|
warnings.add("Native OpenGL library is not supported. Please try again after exit");
|
||||||
|
|
Loading…
Reference in a new issue