Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-08-12 07:24:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-12 07:38:58 +0300
commit216414c65a6b3690aba75caf74d1dbf6dd8247a1 (patch)
tree3731e38a0919b84b3094f1c9c826b706ec31ab02 /source/blender/windowmanager/intern/wm_init_exit.c
parentc741558509a35317209bbfd3ff77c413f791a47c (diff)
Cleanup: use parameters struct for wm_homefile_read
Also add wm_homefile_read_ex which is only needed for the first execution at startup.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index d7ea47fc625..953aa683441 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -279,10 +279,7 @@ void WM_init(bContext *C, int argc, const char **argv)
WM_msgbus_types_init();
- /* get the default database, plus a wm */
bool is_factory_startup = true;
- const bool use_data = true;
- const bool use_userdef = true;
/* Studio-lights needs to be init before we read the home-file,
* otherwise the versioning cannot find the default studio-light. */
@@ -290,15 +287,17 @@ void WM_init(bContext *C, int argc, const char **argv)
BLI_assert((G.fileflags & G_FILE_NO_UI) == 0);
- wm_homefile_read(C,
- NULL,
- G.factory_startup,
- false,
- use_data,
- use_userdef,
- NULL,
- WM_init_state_app_template_get(),
- &is_factory_startup);
+ wm_homefile_read_ex(C,
+ &(const struct wmHomeFileRead_Params){
+ .use_data = true,
+ .use_userdef = true,
+ .use_factory_settings = G.factory_startup,
+ .use_empty_data = false,
+ .filepath_startup_override = NULL,
+ .app_template_override = WM_init_state_app_template_get(),
+ },
+ NULL,
+ &is_factory_startup);
/* Call again to set from userpreferences... */
BLT_lang_set(NULL);