|
RetroArch
|
Static Public Member Functions | |
| static String | getDefaultConfigPath (Context ctx) |
| static void | updateConfigFile (Context ctx) |
| static SharedPreferences | getPreferences (Context ctx) |
Private Member Functions | |
| UserPreferences () | |
Static Private Member Functions | |
| static void | readbackString (ConfigFile cfg, SharedPreferences.Editor edit, String key) |
| static void | readbackBool (ConfigFile cfg, SharedPreferences.Editor edit, String key) |
| static void | readbackDouble (ConfigFile cfg, SharedPreferences.Editor edit, String key) |
| static String | sanitizeLibretroPath (String path) |
| static int | getLowLatencyOptimalSamplingRate (Context ctx) |
| static int | getLowLatencyBufferSize (Context ctx) |
| static int | getOptimalSamplingRate (Context ctx) |
Static Private Attributes | |
| static final String | TAG = "UserPreferences" |
Utility class for retrieving, saving, or loading preferences.
|
inlineprivate |
|
inlinestatic |
Retrieves the path to the default location of the libretro config.
| ctx | the current Context |
|
inlinestaticprivate |
Gets the optimal buffer size for low-latency audio playback.
| ctx | the current Context. |
|
inlinestaticprivate |
Gets the optimal sampling rate for low-latency audio playback.
| ctx | the current Context. |
|
inlinestaticprivate |
Gets the optimal audio sampling rate.
On Android 4.2+ devices this will retrieve the optimal low-latency sampling rate, since Android 4.2 adds support for low latency audio in general.
On other devices, it simply returns the regular optimal sampling rate as returned by the hardware.
| ctx | The current Context. |
|
inlinestatic |
Gets a SharedPreferences instance containing current settings.
| ctx | the current Context. |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
private static void readbackInt(ConfigFile cfg, SharedPreferences.Editor edit, String key) { if (cfg.keyExists(key)) edit.putInt(key, cfg.getInt(key)); else edit.remove(key); }Sanitizes a libretro core path.
| path | The path to the libretro core. |
|
inlinestatic |
Updates the libretro configuration file with new values if settings have changed.
| ctx | the current Context. |
|
staticprivate |
1.8.15