From 1395135d38ed64d073a1e8c9895aef4058263768 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 9 Nov 2025 21:48:39 +1100 Subject: [PATCH] Defer directory (audio/texpacks) creation until actually necessary --- src/Audio.c | 2 ++ src/Launcher.c | 3 --- src/Resources.c | 3 +++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Audio.c b/src/Audio.c index acbef421a..cbca5df0a 100644 --- a/src/Audio.c +++ b/src/Audio.c @@ -525,6 +525,8 @@ void Audio_SetMusic(int volume) { } static void OnInit(void) { + Utils_EnsureDirectory("audio"); + Sounds_Init(); Music_Init(); } diff --git a/src/Launcher.c b/src/Launcher.c index d9b8c50b1..9d16b200d 100644 --- a/src/Launcher.c +++ b/src/Launcher.c @@ -215,9 +215,6 @@ static void Launcher_Init(void) { Event_Register_(&InputEvents.Down2, NULL, OnInputDown); Event_Register_(&InputEvents.Wheel, NULL, OnMouseWheel); - - Utils_EnsureDirectory("texpacks"); - Utils_EnsureDirectory("audio"); } void Launcher_Setup(void) { diff --git a/src/Resources.c b/src/Resources.c index f7b9098e9..cbedfa193 100644 --- a/src/Resources.c +++ b/src/Resources.c @@ -1297,6 +1297,9 @@ void Fetcher_Run(void) { { asset_sets[i]->DownloadAssets(); } + + Utils_EnsureDirectory("texpacks"); + Utils_EnsureDirectory("audio"); } static void Fetcher_Finish(void) {