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

This commit is contained in:
MysterD 2023-11-19 20:40:43 -08:00
parent b5de761230
commit c2bd921f05
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

@ -257,6 +257,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