This commit is contained in:
nakst 2021-10-16 20:30:33 +01:00
parent 45b82ab5ad
commit bb37d2ae47
1 changed files with 6 additions and 0 deletions

View File

@ -557,6 +557,9 @@ void DocumentSave(void *) {
#ifdef OS_ESSENCE
EsBuffer buffer = { .canGrow = 1 };
#define fwrite(a, b, c, d) EsBufferWrite(&buffer, (a), (b) * (c))
#elif defined(UI_WINDOWS)
FILE *f = fopen("Theme Source.dat", "wb");
if (!f) return;
#else
FILE *f = fopen("res/Theme Source.dat", "wb");
#endif
@ -590,6 +593,9 @@ void DocumentLoad() {
EsBuffer buffer = {};
buffer.out = (uint8_t *) EsFileStoreReadAll(fileStore, &buffer.bytes);
#define fread(a, b, c, d) EsBufferReadInto(&buffer, (a), (b) * (c))
#elif defined(UI_WINDOWS)
FILE *f = fopen("Theme Source.dat", "rb");
if (!f) return;
#else
FILE *f = fopen("res/Theme Source.dat", "rb");
if (!f) return;