X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/c12d43471d4932dabaa39249104c29f83b4181c0..ac150134f51cccffab083c1054cc2b071a9468f5:/src/main.c diff --git a/src/main.c b/src/main.c index 84376f81..46cf5674 100644 --- a/src/main.c +++ b/src/main.c @@ -179,6 +179,15 @@ int main( int argc, char *argv[] ) a_settings_init (); a_preferences_init (); + /* + * First stage initialization + * + * Should not use a_preferences_get() yet + * + * Since the first time a_preferences_get() is called it loads any preferences values from disk, + * but of course for preferences not registered yet it can't actually understand them + * so subsequent initial attempts to get those preferences return the default value, until the values have changed + */ a_vik_preferences_init (); a_layer_defaults_init (); @@ -199,6 +208,16 @@ int main( int argc, char *argv[] ) a_toolbar_init(); vik_routing_prefs_init(); + /* + * Second stage initialization + * + * Can now use a_preferences_get() + */ + a_background_post_init (); + a_babel_post_init (); + modules_post_init (); + + // May need to initialize the Positonal TimeZone lookup if ( a_vik_get_time_ref_frame() == VIK_TIME_REF_WORLD ) vu_setup_lat_lon_tz_lookup();