isle-portable/ISLE/ios/config.cpp
Helloyunho 9d8cb64a19
Add iOS Port (#566)
*  feat: add ios support

* ⚗️ chore: trying some experiments to make ci working

* ⚗️ chore: is it really ci version problem?

* 💚 fix: it really is just a ci version issue

* 🩹 fix: go as low as possible

* 🩹 fix: support ipad
2025-07-10 08:34:52 +02:00

26 lines
766 B
C++

#include "config.h"
#include <SDL3/SDL_filesystem.h>
#include <SDL3/SDL_log.h>
#include <iniparser.h>
void IOS_SetupDefaultConfigOverrides(dictionary* p_dictionary)
{
SDL_Log("Overriding default config for iOS");
// Use DevelopmentFiles path for disk and cd paths
// It's good to use that path since user can easily
// connect through SMB and copy the files
const char* documentFolder = SDL_GetUserFolder(SDL_FOLDER_DOCUMENTS);
char* diskPath = new char[strlen(documentFolder) + strlen("isle") + 1]();
strcpy(diskPath, documentFolder);
strcat(diskPath, "isle");
if (!SDL_GetPathInfo(diskPath, NULL)) {
SDL_CreateDirectory(diskPath);
}
iniparser_set(p_dictionary, "isle:diskpath", diskPath);
iniparser_set(p_dictionary, "isle:cdpath", diskPath);
}