Fix #104507: Show Splash if New Version #105863

Merged
Harley Acheson merged 3 commits from Harley/blender:SplashLoad into main 2023-04-05 22:35:17 +02:00
1 changed files with 11 additions and 2 deletions
Showing only changes of commit 3b874bd101 - Show all commits

View File

@ -24,6 +24,8 @@
#include "DNA_genfile.h"
#include "BLI_fileops.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_system.h"
#include "BLI_task.h"
@ -577,9 +579,16 @@ int main(int argc,
WM_exit(C);
}
else {
/* When no file is loaded, show the splash screen. */
/* When no file is loaded or if there is no userprefs, show the splash screen. */
const char *blendfile_path = BKE_main_blendfile_path_from_global();
if (blendfile_path[0] == '\0') {
char userpref[FILE_MAX] = {0};
const char *const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, NULL);
if (cfgdir) {
BLI_path_join(userpref, sizeof(userpref), cfgdir, BLENDER_USERPREF_FILE);
}
if (blendfile_path[0] == '\0' || !BLI_exists(userpref)) {
WM_init_splash(C);
}
WM_main(C);