(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
This commit is contained in:
twinaphex 2014-07-08 15:29:45 +02:00
parent 0b44fef6d1
commit 86f51d703f

View File

@ -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)