forked from eden-emu/eden
[kotlin] Don't check for updates if ENABLE_UPDARE_CHECKERE
is OFF
This commit is contained in:
parent
abd24b12e5
commit
67c3197ee5
4 changed files with 21 additions and 2 deletions
|
@ -215,6 +215,11 @@ object NativeLibrary {
|
|||
*/
|
||||
external fun getUpdateUrl(version: String): String
|
||||
|
||||
/**
|
||||
* Returns whether the update checker is enabled through CMAKE options.
|
||||
*/
|
||||
external fun isUpdateCheckerEnabled(): Boolean
|
||||
|
||||
enum class CoreError {
|
||||
ErrorSystemFiles,
|
||||
ErrorSavestate,
|
||||
|
|
|
@ -64,7 +64,9 @@ class YuzuApplication : Application() {
|
|||
Log.logDeviceInfo()
|
||||
|
||||
// Initialize CA certificates for HTTPS
|
||||
initializeCACertificates()
|
||||
if (NativeLibrary.isUpdateCheckerEnabled()) {
|
||||
initializeCACertificates()
|
||||
}
|
||||
|
||||
createNotificationChannels()
|
||||
}
|
||||
|
|
|
@ -196,7 +196,8 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
|||
|
||||
val firstTimeSetup = PreferenceManager.getDefaultSharedPreferences(applicationContext)
|
||||
.getBoolean(Settings.PREF_FIRST_APP_LAUNCH, true)
|
||||
if (!firstTimeSetup) {
|
||||
|
||||
if (!firstTimeSetup && NativeLibrary.isUpdateCheckerEnabled()) {
|
||||
checkForUpdates()
|
||||
}
|
||||
setInsets()
|
||||
|
|
|
@ -1064,6 +1064,17 @@ JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_updatePowerState(
|
|||
g_has_battery.store(hasBattery, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
// return #ifdef ENABLE_UPDATE_CHECKER
|
||||
JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_isUpdateCheckerEnabled(
|
||||
JNIEnv* env,
|
||||
jobject obj) {
|
||||
#ifdef ENABLE_UPDATE_CHECKER
|
||||
return JNI_TRUE;
|
||||
#else
|
||||
return JNI_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef ENABLE_UPDATE_CHECKER
|
||||
JNIEXPORT void JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_setCACertificatePath(
|
||||
JNIEnv* env,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue