mirror of https://gitlab.com/nakst/essence
move default settings into settings.cpp
This commit is contained in:
parent
5d4b2caeb4
commit
6d1039ad77
|
@ -898,9 +898,9 @@ void WriteNewConfiguration() {
|
||||||
EsBuffer buffer = { .canGrow = true };
|
EsBuffer buffer = { .canGrow = true };
|
||||||
|
|
||||||
while (EsINIParse(&s)) {
|
while (EsINIParse(&s)) {
|
||||||
if (!s.sectionClassBytes && 0 == EsStringCompareRaw(s.section, s.sectionBytes, EsLiteral("ui"))
|
if (!s.sectionClassBytes && 0 == EsStringCompareRaw(s.section, s.sectionBytes, EsLiteral("ui_fonts"))
|
||||||
&& 0 == EsStringCompareRaw(s.key, s.keyBytes, EsLiteral("font_sans"))) {
|
&& 0 == EsStringCompareRaw(s.key, s.keyBytes, EsLiteral("sans"))) {
|
||||||
EsBufferFormat(&buffer, "font_sans=%z\n", cSelectedFont);
|
EsBufferFormat(&buffer, "sans=%z\n", cSelectedFont);
|
||||||
} else if (!s.sectionClassBytes && 0 == EsStringCompareRaw(s.section, s.sectionBytes, EsLiteral("general"))
|
} else if (!s.sectionClassBytes && 0 == EsStringCompareRaw(s.section, s.sectionBytes, EsLiteral("general"))
|
||||||
&& 0 == EsStringCompareRaw(s.key, s.keyBytes, EsLiteral("installation_state"))) {
|
&& 0 == EsStringCompareRaw(s.key, s.keyBytes, EsLiteral("installation_state"))) {
|
||||||
EsBufferFormat(&buffer, "installation_state=0\n");
|
EsBufferFormat(&buffer, "installation_state=0\n");
|
||||||
|
|
|
@ -426,9 +426,9 @@ void SystemConfigurationUnload() {
|
||||||
api.systemConfigurationGroups.Free();
|
api.systemConfigurationGroups.Free();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SystemConfigurationLoad(char *file, size_t fileBytes) {
|
void SystemConfigurationLoad(const char *file, size_t fileBytes) {
|
||||||
EsINIState s = {};
|
EsINIState s = {};
|
||||||
s.buffer = file;
|
s.buffer = (char *) file;
|
||||||
s.bytes = fileBytes;
|
s.bytes = fileBytes;
|
||||||
|
|
||||||
EsSystemConfigurationGroup *group = nullptr;
|
EsSystemConfigurationGroup *group = nullptr;
|
||||||
|
@ -455,8 +455,6 @@ void SystemConfigurationLoad(char *file, size_t fileBytes) {
|
||||||
group->itemCount++;
|
group->itemCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EsHeapFree(file);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t *ApplicationStartupInformationToBuffer(const _EsApplicationStartupInformation *information, size_t *dataBytes = nullptr) {
|
uint8_t *ApplicationStartupInformationToBuffer(const _EsApplicationStartupInformation *information, size_t *dataBytes = nullptr) {
|
||||||
|
@ -1383,6 +1381,7 @@ extern "C" void _start(EsProcessStartupInformation *_startupInformation) {
|
||||||
void *file = EsFileReadAll(K_SYSTEM_CONFIGURATION, -1, &fileSize);
|
void *file = EsFileReadAll(K_SYSTEM_CONFIGURATION, -1, &fileSize);
|
||||||
EsAssert(file);
|
EsAssert(file);
|
||||||
SystemConfigurationLoad((char *) file, fileSize);
|
SystemConfigurationLoad((char *) file, fileSize);
|
||||||
|
EsHeapFree(file);
|
||||||
|
|
||||||
_EsNodeInformation node;
|
_EsNodeInformation node;
|
||||||
char *path;
|
char *path;
|
||||||
|
@ -1392,6 +1391,7 @@ extern "C" void _start(EsProcessStartupInformation *_startupInformation) {
|
||||||
NodeAddMountPoint(EsLiteral("|Fonts:"), node.handle, false);
|
NodeAddMountPoint(EsLiteral("|Fonts:"), node.handle, false);
|
||||||
EsHeapFree(path);
|
EsHeapFree(path);
|
||||||
|
|
||||||
|
SettingsLoadDefaults();
|
||||||
SettingsUpdateGlobalAndWindowManager();
|
SettingsUpdateGlobalAndWindowManager();
|
||||||
SettingsWindowColorUpdated();
|
SettingsWindowColorUpdated();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1428,6 +1428,7 @@ extern "C" void _start(EsProcessStartupInformation *_startupInformation) {
|
||||||
EsBuffer responseBuffer = { .canGrow = true };
|
EsBuffer responseBuffer = { .canGrow = true };
|
||||||
MessageDesktop(&m, 1, ES_INVALID_HANDLE, &responseBuffer);
|
MessageDesktop(&m, 1, ES_INVALID_HANDLE, &responseBuffer);
|
||||||
SystemConfigurationLoad((char *) responseBuffer.out, responseBuffer.bytes);
|
SystemConfigurationLoad((char *) responseBuffer.out, responseBuffer.bytes);
|
||||||
|
EsHeapFree(responseBuffer.out);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uiProcess) {
|
if (uiProcess) {
|
||||||
|
|
|
@ -2568,7 +2568,7 @@ void DesktopSyscall(EsMessage *message, uint8_t *buffer, EsBuffer *pipe) {
|
||||||
InstalledApplication *application = ApplicationFindByPID(message->desktop.processID);
|
InstalledApplication *application = ApplicationFindByPID(message->desktop.processID);
|
||||||
|
|
||||||
ConfigurationWriteSectionsToBuffer("font", nullptr, false, pipe);
|
ConfigurationWriteSectionsToBuffer("font", nullptr, false, pipe);
|
||||||
ConfigurationWriteSectionsToBuffer(nullptr, "ui", false, pipe);
|
ConfigurationWriteSectionsToBuffer(nullptr, "ui_fonts", false, pipe);
|
||||||
|
|
||||||
if (application && (application->permissions & APPLICATION_PERMISSION_ALL_FILES)) {
|
if (application && (application->permissions & APPLICATION_PERMISSION_ALL_FILES)) {
|
||||||
ConfigurationWriteSectionsToBuffer(nullptr, "paths", false, pipe);
|
ConfigurationWriteSectionsToBuffer(nullptr, "paths", false, pipe);
|
||||||
|
|
|
@ -134,6 +134,67 @@ const EsStyle styleSliderRow = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool SettingsPutValue(const char *cConfigurationSection, const char *cConfigurationKey, char *newValue, size_t newValueBytes,
|
||||||
|
char **oldValue, size_t *oldValueBytes, bool duplicate, bool overwriteExisting) {
|
||||||
|
if (duplicate) {
|
||||||
|
char *newValueDuplicate = (char *) EsHeapAllocate(newValueBytes, false);
|
||||||
|
|
||||||
|
if (!newValueDuplicate) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
EsMemoryCopy(newValueDuplicate, newValue, newValueBytes);
|
||||||
|
newValue = newValueDuplicate;
|
||||||
|
}
|
||||||
|
|
||||||
|
EsSystemConfigurationGroup *group = SystemConfigurationGetGroup(cConfigurationSection, -1, true);
|
||||||
|
|
||||||
|
if (!group) {
|
||||||
|
EsHeapFree(newValue);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
EsSystemConfigurationItem *item = SystemConfigurationGetItem(group, cConfigurationKey, -1, true);
|
||||||
|
|
||||||
|
if (!item) {
|
||||||
|
EsHeapFree(newValue);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oldValue) {
|
||||||
|
*oldValue = item->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oldValueBytes) {
|
||||||
|
*oldValueBytes = item->valueBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!overwriteExisting && item->valueBytes) {
|
||||||
|
EsHeapFree(newValue);
|
||||||
|
} else {
|
||||||
|
if (!oldValue) {
|
||||||
|
EsHeapFree(item->value);
|
||||||
|
}
|
||||||
|
|
||||||
|
item->value = newValue;
|
||||||
|
item->valueBytes = newValueBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SettingsLoadDefaults() {
|
||||||
|
SettingsPutValue("general", "click_chain_timeout_ms", EsLiteral("500"), nullptr, nullptr, true, false);
|
||||||
|
SettingsPutValue("general", "show_cursor_shadow", EsLiteral("1"), nullptr, nullptr, true, false);
|
||||||
|
SettingsPutValue("general", "scroll_lines_per_notch", EsLiteral("3"), nullptr, nullptr, true, false);
|
||||||
|
SettingsPutValue("general", "ui_scale", EsLiteral("100"), nullptr, nullptr, true, false);
|
||||||
|
SettingsPutValue("general", "window_color", EsLiteral("6"), nullptr, nullptr, true, false);
|
||||||
|
SettingsPutValue("general", "use_smart_quotes", EsLiteral("1"), nullptr, nullptr, true, false);
|
||||||
|
SettingsPutValue("general", "enable_hover_state", EsLiteral("1"), nullptr, nullptr, true, false);
|
||||||
|
SettingsPutValue("general", "enable_animations", EsLiteral("1"), nullptr, nullptr, true, false);
|
||||||
|
SettingsPutValue("paths", "default_user_documents", EsLiteral("0:/"), nullptr, nullptr, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
void SettingsUpdateGlobalAndWindowManager() {
|
void SettingsUpdateGlobalAndWindowManager() {
|
||||||
api.global->clickChainTimeoutMs = EsSystemConfigurationReadInteger(EsLiteral("general"), EsLiteral("click_chain_timeout_ms"));
|
api.global->clickChainTimeoutMs = EsSystemConfigurationReadInteger(EsLiteral("general"), EsLiteral("click_chain_timeout_ms"));
|
||||||
api.global->swapLeftAndRightButtons = EsSystemConfigurationReadInteger(EsLiteral("general"), EsLiteral("swap_left_and_right_buttons"));
|
api.global->swapLeftAndRightButtons = EsSystemConfigurationReadInteger(EsLiteral("general"), EsLiteral("swap_left_and_right_buttons"));
|
||||||
|
@ -196,18 +257,14 @@ void SettingsNumberBoxSetValue(EsElement *element, double newValueDouble) {
|
||||||
|
|
||||||
EsMutexAcquire(&api.systemConfigurationMutex);
|
EsMutexAcquire(&api.systemConfigurationMutex);
|
||||||
|
|
||||||
EsSystemConfigurationGroup *group = SystemConfigurationGetGroup(control->cConfigurationSection, -1, true);
|
char *value = (char *) EsHeapAllocate(65, true), *_oldValue;
|
||||||
|
size_t valueBytes = EsStringFormat(value, 64, "%fd", ES_STRING_FORMAT_SIMPLE, newValue), _oldValueBytes;
|
||||||
int32_t oldValue = 0;
|
int32_t oldValue = 0;
|
||||||
|
|
||||||
if (group) {
|
if (SettingsPutValue(control->cConfigurationSection, control->cConfigurationKey, value, valueBytes,
|
||||||
EsSystemConfigurationItem *item = SystemConfigurationGetItem(group, control->cConfigurationKey, -1, true);
|
&_oldValue, &_oldValueBytes, false, true)) {
|
||||||
|
oldValue = EsIntegerParse(_oldValue, _oldValueBytes);
|
||||||
if (item) {
|
EsHeapFree(_oldValue);
|
||||||
oldValue = EsIntegerParse(item->value, item->valueBytes);
|
|
||||||
EsHeapFree(item->value);
|
|
||||||
item->value = (char *) EsHeapAllocate(65, true);
|
|
||||||
item->valueBytes = EsStringFormat(item->value, 64, "%fd", ES_STRING_FORMAT_SIMPLE, newValue);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EsMutexRelease(&api.systemConfigurationMutex);
|
EsMutexRelease(&api.systemConfigurationMutex);
|
||||||
|
@ -263,19 +320,15 @@ void SettingsCheckboxCommand(EsInstance *_instance, EsElement *element, EsComman
|
||||||
|
|
||||||
EsMutexAcquire(&api.systemConfigurationMutex);
|
EsMutexAcquire(&api.systemConfigurationMutex);
|
||||||
|
|
||||||
EsSystemConfigurationGroup *group = SystemConfigurationGetGroup(control->cConfigurationSection, -1, true);
|
char *value = (char *) EsHeapAllocate(2, true), *_oldValue;
|
||||||
|
size_t _oldValueBytes;
|
||||||
|
value[0] = newValue ? '1' : '0';
|
||||||
bool oldValue = false;
|
bool oldValue = false;
|
||||||
|
|
||||||
if (group) {
|
if (SettingsPutValue(control->cConfigurationSection, control->cConfigurationKey, value, 1,
|
||||||
EsSystemConfigurationItem *item = SystemConfigurationGetItem(group, control->cConfigurationKey, -1, true);
|
&_oldValue, &_oldValueBytes, false, true)) {
|
||||||
|
oldValue = EsIntegerParse(_oldValue, _oldValueBytes);
|
||||||
if (item) {
|
EsHeapFree(_oldValue);
|
||||||
oldValue = EsIntegerParse(item->value, item->valueBytes);
|
|
||||||
EsHeapFree(item->value);
|
|
||||||
item->value = (char *) EsHeapAllocate(2, true);
|
|
||||||
*item->value = newValue ? '1' : '0';
|
|
||||||
item->valueBytes = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EsMutexRelease(&api.systemConfigurationMutex);
|
EsMutexRelease(&api.systemConfigurationMutex);
|
||||||
|
@ -389,19 +442,15 @@ int SettingsSliderMessage(EsElement *element, EsMessage *message) {
|
||||||
if (message->type == ES_MSG_SLIDER_MOVED && !message->sliderMoved.inDrag) {
|
if (message->type == ES_MSG_SLIDER_MOVED && !message->sliderMoved.inDrag) {
|
||||||
EsMutexAcquire(&api.systemConfigurationMutex);
|
EsMutexAcquire(&api.systemConfigurationMutex);
|
||||||
|
|
||||||
EsSystemConfigurationGroup *group = SystemConfigurationGetGroup(control->cConfigurationSection, -1, true);
|
|
||||||
int32_t oldValue = 0;
|
|
||||||
int32_t newValue = LinearMap(0, 1, control->minimumValue, control->maximumValue, EsSliderGetValue(slider));
|
int32_t newValue = LinearMap(0, 1, control->minimumValue, control->maximumValue, EsSliderGetValue(slider));
|
||||||
|
char *value = (char *) EsHeapAllocate(65, true), *_oldValue;
|
||||||
|
size_t valueBytes = EsStringFormat(value, 64, "%fd", ES_STRING_FORMAT_SIMPLE, newValue), _oldValueBytes;
|
||||||
|
int32_t oldValue = 0;
|
||||||
|
|
||||||
if (group) {
|
if (SettingsPutValue(control->cConfigurationSection, control->cConfigurationKey, value, valueBytes,
|
||||||
EsSystemConfigurationItem *item = SystemConfigurationGetItem(group, control->cConfigurationKey, -1, true);
|
&_oldValue, &_oldValueBytes, false, true)) {
|
||||||
|
oldValue = EsIntegerParse(_oldValue, _oldValueBytes);
|
||||||
if (item) {
|
EsHeapFree(_oldValue);
|
||||||
oldValue = EsIntegerParse(item->value, item->valueBytes);
|
|
||||||
EsHeapFree(item->value);
|
|
||||||
item->value = (char *) EsHeapAllocate(65, true);
|
|
||||||
item->valueBytes = EsStringFormat(item->value, 64, "%fd", ES_STRING_FORMAT_SIMPLE, newValue);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EsMutexRelease(&api.systemConfigurationMutex);
|
EsMutexRelease(&api.systemConfigurationMutex);
|
||||||
|
@ -623,18 +672,9 @@ void SettingsColorButtonCommand(EsInstance *, EsElement *element, EsCommand *) {
|
||||||
}
|
}
|
||||||
|
|
||||||
EsMutexAcquire(&api.systemConfigurationMutex);
|
EsMutexAcquire(&api.systemConfigurationMutex);
|
||||||
EsSystemConfigurationGroup *group = SystemConfigurationGetGroup("general", -1, true);
|
char *value = (char *) EsHeapAllocate(65, true);
|
||||||
|
size_t valueBytes = EsStringFormat(value, 64, "%fd", ES_STRING_FORMAT_SIMPLE, element->userData.u);
|
||||||
if (group) {
|
SettingsPutValue("general", "window_color", value, valueBytes, nullptr, nullptr, false, true);
|
||||||
EsSystemConfigurationItem *item = SystemConfigurationGetItem(group, "window_color", -1, true);
|
|
||||||
|
|
||||||
if (item) {
|
|
||||||
EsHeapFree(item->value);
|
|
||||||
item->value = (char *) EsHeapAllocate(65, true);
|
|
||||||
item->valueBytes = EsStringFormat(item->value, 64, "%fd", ES_STRING_FORMAT_SIMPLE, element->userData.u);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EsMutexRelease(&api.systemConfigurationMutex);
|
EsMutexRelease(&api.systemConfigurationMutex);
|
||||||
SettingsWindowColorUpdated();
|
SettingsWindowColorUpdated();
|
||||||
desktop.configurationModified = true;
|
desktop.configurationModified = true;
|
||||||
|
@ -665,19 +705,16 @@ void SettingsPageTheme(EsElement *element, SettingsPage *page) {
|
||||||
if (message->type == ES_MSG_TEXTBOX_EDIT_END) {
|
if (message->type == ES_MSG_TEXTBOX_EDIT_END) {
|
||||||
EsMutexAcquire(&api.systemConfigurationMutex);
|
EsMutexAcquire(&api.systemConfigurationMutex);
|
||||||
|
|
||||||
EsSystemConfigurationGroup *group = SystemConfigurationGetGroup("general", -1, true);
|
size_t newValueBytes;
|
||||||
|
char *newValue = EsTextboxGetContents((EsTextbox *) element, &newValueBytes);
|
||||||
|
|
||||||
if (group) {
|
if (newValue) {
|
||||||
EsSystemConfigurationItem *item = SystemConfigurationGetItem(group, "wallpaper", -1, true);
|
SettingsPutValue("general", "wallpaper", newValue, newValueBytes, nullptr, nullptr, false, true);
|
||||||
|
|
||||||
if (item) {
|
|
||||||
EsHeapFree(item->value);
|
|
||||||
item->value = EsTextboxGetContents((EsTextbox *) element, &item->valueBytes);
|
|
||||||
desktop.configurationModified = true;
|
|
||||||
EsThreadCreate(WallpaperLoad, nullptr, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
desktop.configurationModified = true;
|
||||||
|
EsThreadCreate(WallpaperLoad, nullptr, 0);
|
||||||
|
|
||||||
EsMutexRelease(&api.systemConfigurationMutex);
|
EsMutexRelease(&api.systemConfigurationMutex);
|
||||||
return ES_HANDLED;
|
return ES_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -453,10 +453,10 @@ void FontInitialise() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fontManagement.sansName = EsSystemConfigurationReadString(EsLiteral("ui"), EsLiteral("font_sans"));
|
fontManagement.sansName = EsSystemConfigurationReadString(EsLiteral("ui_fonts"), EsLiteral("sans"));
|
||||||
fontManagement.serifName = EsSystemConfigurationReadString(EsLiteral("ui"), EsLiteral("font_serif"));
|
fontManagement.serifName = EsSystemConfigurationReadString(EsLiteral("ui_fonts"), EsLiteral("serif"));
|
||||||
fontManagement.monospacedName = EsSystemConfigurationReadString(EsLiteral("ui"), EsLiteral("font_mono"));
|
fontManagement.monospacedName = EsSystemConfigurationReadString(EsLiteral("ui_fonts"), EsLiteral("mono"));
|
||||||
fontManagement.fallbackName = EsSystemConfigurationReadString(EsLiteral("ui"), EsLiteral("font_fallback"));
|
fontManagement.fallbackName = EsSystemConfigurationReadString(EsLiteral("ui_fonts"), EsLiteral("fallback"));
|
||||||
|
|
||||||
FontDatabaseEntry nullFont = {};
|
FontDatabaseEntry nullFont = {};
|
||||||
fontManagement.database.Add(nullFont);
|
fontManagement.database.Add(nullFont);
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
[general]
|
|
||||||
click_chain_timeout_ms=500
|
|
||||||
show_cursor_shadow=1
|
|
||||||
scroll_lines_per_notch=3
|
|
||||||
ui_scale=100
|
|
||||||
window_color=6
|
|
||||||
use_smart_quotes=1
|
|
||||||
enable_hover_state=1
|
|
||||||
enable_animations=1
|
|
||||||
|
|
||||||
[ui]
|
|
||||||
font_fallback=Inter
|
|
||||||
font_sans=Inter
|
|
||||||
font_serif=Inter
|
|
||||||
font_mono=Hack
|
|
Binary file not shown.
Binary file not shown.
|
@ -773,32 +773,25 @@ void ParseApplicationManifest(const char *manifestPath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputSystemConfiguration() {
|
void OutputSystemConfiguration() {
|
||||||
EsINIState s = {};
|
|
||||||
char *config = (char *) LoadFile("res/System Configuration Template.ini", &s.bytes);
|
|
||||||
s.buffer = config;
|
|
||||||
File file = FileOpen("root/" SYSTEM_FOLDER_NAME "/Default.ini", 'w');
|
File file = FileOpen("root/" SYSTEM_FOLDER_NAME "/Default.ini", 'w');
|
||||||
|
|
||||||
while (EsINIParse(&s)) {
|
FilePrintFormat(file, "\n[paths]\n"
|
||||||
EsINIZeroTerminate(&s);
|
"fonts=0:/" SYSTEM_FOLDER_NAME "/Fonts\n"
|
||||||
|
"temporary=0:/" SYSTEM_FOLDER_NAME "/Temporary\n"
|
||||||
|
"default_settings=0:/" SYSTEM_FOLDER_NAME "/Settings\n"
|
||||||
|
"\n[ui_fonts]\n"
|
||||||
|
"fallback=Inter\n"
|
||||||
|
"sans=Inter\n"
|
||||||
|
"serif=Inter\n"
|
||||||
|
"mono=Hack\n");
|
||||||
|
|
||||||
|
FilePrintFormat(file, "\n[general]\nnext_id=%d\n", nextID);
|
||||||
|
|
||||||
|
for (uintptr_t i = 0; i < arrlenu(generalOptions); i++) {
|
||||||
char buffer[4096];
|
char buffer[4096];
|
||||||
FileWrite(file, EsINIFormat(&s, buffer, sizeof(buffer)), buffer);
|
FileWrite(file, EsINIFormat(generalOptions + i, buffer, sizeof(buffer)), buffer);
|
||||||
|
|
||||||
if (0 == strcmp(s.section, "general") && (!EsINIPeek(&s) || !s.keyBytes)) {
|
|
||||||
FilePrintFormat(file, "next_id=%d\n", nextID);
|
|
||||||
|
|
||||||
for (uintptr_t i = 0; i < arrlenu(generalOptions); i++) {
|
|
||||||
FileWrite(file, EsINIFormat(generalOptions + i, buffer, sizeof(buffer)), buffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePrintFormat(file, "\n[paths]\n");
|
|
||||||
FilePrintFormat(file, "fonts=0:/" SYSTEM_FOLDER_NAME "/Fonts\n");
|
|
||||||
FilePrintFormat(file, "temporary=0:/" SYSTEM_FOLDER_NAME "/Temporary\n");
|
|
||||||
FilePrintFormat(file, "default_settings=0:/" SYSTEM_FOLDER_NAME "/Settings\n");
|
|
||||||
FilePrintFormat(file, "default_user_documents=0:/\n");
|
|
||||||
|
|
||||||
for (uintptr_t i = 0; i < arrlenu(applications); i++) {
|
for (uintptr_t i = 0; i < arrlenu(applications); i++) {
|
||||||
if (!applications[i].install) {
|
if (!applications[i].install) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue