From 86f51d703fb11054062a9b2cf407add1e60ca51e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 8 Jul 2014 15:29:45 +0200 Subject: [PATCH] (Settings data/iOS) Fix crash at startup with new config - audio latency was being set to 0 because g_defaults.out_latency would point to 0 - instead, we check if g_defaults.settings.out_latency is higher than 0 and if so, set the setting to that - otherwise, default to value in config.def.h On an unrelated note - the setting I just added to settings_data.c still doesn't show up. This code is in need of some serious refactoring --- settings_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings_data.c b/settings_data.c index e458b12350..5644958559 100644 --- a/settings_data.c +++ b/settings_data.c @@ -629,7 +629,7 @@ const rarch_setting_t* setting_data_get_list(void) START_SUB_GROUP("Sync") CONFIG_BOOL(g_settings.audio.sync, "audio_sync", "Enable Sync", audio_sync) - CONFIG_UINT(g_settings.audio.latency, "audio_latency", "Latency", g_defaults.settings.out_latency) + CONFIG_UINT(g_settings.audio.latency, "audio_latency", "Latency", g_defaults.settings.out_latency ? g_defaults.settings.out_latency : out_latency) CONFIG_BOOL(g_settings.audio.rate_control, "audio_rate_control", "Enable Rate Control", rate_control) CONFIG_FLOAT(g_settings.audio.rate_control_delta, "audio_rate_control_delta", "Rate Control Delta", rate_control_delta) CONFIG_UINT(g_settings.audio.block_frames, "audio_block_frames", "Block Frames", DEFAULT_ME_YO)