Skip to content

Commit

Permalink
Load celestia.so early
Browse files Browse the repository at this point in the history
  • Loading branch information
levinli303 committed Apr 5, 2021
1 parent edd4fa6 commit 8949d61
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="space.celestia.mobilecelestia"
android:versionCode="165"
android:versionCode="168"
android:versionName="1.2.10">

<uses-feature android:glEsVersion="0x00020000" android:required="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,6 @@ class MainActivity : AppCompatActivity(R.layout.activity_main),
enableMultisample = preferenceManager[PreferenceManager.PredefinedKey.MSAA] == "true"
enableHiDPI = preferenceManager[PreferenceManager.PredefinedKey.FullDPI] != "false" // default on

// Load core library
if (!celestiaLibraryLoaded) {
System.loadLibrary("celestia")
celestiaLibraryLoaded = true
}

AppStatusReporter.shared().updateState(AppStatusReporter.State.EXTERNAL_LOADING_FINISHED)
}

Expand Down Expand Up @@ -1651,6 +1645,7 @@ class MainActivity : AppCompatActivity(R.layout.activity_main),

init {
System.loadLibrary("nativecrashhandler")
System.loadLibrary("celestia")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ package space.celestia.mobilecelestia.utils

import space.celestia.mobilecelestia.core.CelestiaAppCore

var celestiaLibraryLoaded = false

@Suppress("FunctionName")
fun CelestiaString(key: String, @Suppress("UNUSED_PARAMETER") comment: String): String {
if (!celestiaLibraryLoaded)
return key
return CelestiaAppCore.getLocalizedString(key)
}

0 comments on commit 8949d61

Please sign in to comment.