mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
[Android] Disable the preference "Automatically detect audio latency" if the Android device running RetroArch is less than Android 4.1. Auto detection won't work on those below it.
This commit is contained in:
parent
cae9591c2f
commit
1cb397dac7
@ -3,7 +3,9 @@ package org.retroarch.browser.preferences.fragments;
|
|||||||
import org.retroarch.R;
|
import org.retroarch.R;
|
||||||
import org.retroarch.browser.preferences.fragments.util.PreferenceListFragment;
|
import org.retroarch.browser.preferences.fragments.util.PreferenceListFragment;
|
||||||
|
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.preference.CheckBoxPreference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link PreferenceListFragment} responsible for handling the audio preferences.
|
* A {@link PreferenceListFragment} responsible for handling the audio preferences.
|
||||||
@ -17,5 +19,13 @@ public final class AudioPreferenceFragment extends PreferenceListFragment
|
|||||||
|
|
||||||
// Add audio preferences from the XML.
|
// Add audio preferences from the XML.
|
||||||
addPreferencesFromResource(R.xml.audio_preferences);
|
addPreferencesFromResource(R.xml.audio_preferences);
|
||||||
|
|
||||||
|
// Disable automatic detection of optimal audio latency if a device is below Android 4.1
|
||||||
|
final CheckBoxPreference autoDetectAudioLatency = (CheckBoxPreference) findPreference("audio_latency_auto");
|
||||||
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN)
|
||||||
|
{
|
||||||
|
autoDetectAudioLatency.setChecked(false);
|
||||||
|
autoDetectAudioLatency.setEnabled(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user