Have the loading screen indicate when it's generating texture/model packs

This commit is contained in:
David Joslin 2023-11-19 20:40:43 -08:00 committed by Agent X
parent d6b3f3660d
commit d1ffab4219
2 changed files with 4 additions and 0 deletions

View file

@ -2,6 +2,8 @@
#include "src/pc/loading.h"
void DynOS_Gfx_GeneratePacks(const char* directory) {
if (gIsThreaded) { REFRESH_MUTEX(snprintf(gCurrLoadingSegment.str, 256, "Generating DynOS Packs in path:\n\\#808080\\%s", directory)); }
DIR *modsDir = opendir(directory);
if (!modsDir) { return; }
@ -57,6 +59,7 @@ static void ScanPacksFolder(SysPath _DynosPacksFolder) {
// If pack folder exists, add it to the pack list
SysPath _PackFolder = fstring("%s/%s", _DynosPacksFolder.c_str(), _DynosPacksEnt->d_name);
if (fs_sys_dir_exists(_PackFolder.c_str())) {
if (gIsThreaded) { REFRESH_MUTEX(snprintf(gCurrLoadingSegment.str, 256, "Generating DynOS pack:\n\\#808080\\%s", _PackFolder.c_str())); }
DynOS_Pack_Add(_PackFolder);
DynOS_Actor_GeneratePack(_PackFolder);
DynOS_Tex_GeneratePack(_PackFolder, _PackFolder, false);

View file

@ -262,6 +262,7 @@ void* main_game_init(UNUSED void* arg) {
const char *userpath = gCLIOpts.SavePath[0] ? gCLIOpts.SavePath : sys_user_path();
fs_init(sys_ropaths, gamedir, userpath);
if (gIsThreaded) { REFRESH_MUTEX(snprintf(gCurrLoadingSegment.str, 256, "Loading")); }
dynos_gfx_init();
// load config