Added FileDownloader utility based on libcurl to download files from URLs on native platforms

This commit is contained in:
Yousef Khadadeh 2025-10-01 17:54:23 +03:00
parent 220eb34ab9
commit 08680c6e94
8 changed files with 232 additions and 3 deletions

View file

@ -1,5 +1,6 @@
#include "Helpers/SCollision.hpp"
#include "Helpers/StringHelpers.hpp"
#include "Helpers/FileDownloader.hpp"
#include "include/gpu/GpuTypes.h"
#include "sago/platform_folders.h"
#include <SDL3/SDL_hints.h>
@ -387,6 +388,10 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) {
init_logs(mS);
#ifndef __EMSCRIPTEN__
FileDownloader::init();
#endif
#ifdef NDEBUG
try {
#endif
@ -770,5 +775,9 @@ void SDL_AppQuit(void *appstate, SDL_AppResult result) {
delete (&mS);
#ifndef __EMSCRIPTEN__
FileDownloader::cleanup();
#endif
SDL_Quit();
}