sdl/runner.c
/** Called when persistent RAM will be accessed the first time */
Called when persistent RAM will be accessed the first time
Called when persistent RAM will be accessed the first time
void persistentRamWillAccess(void *context, uint8_t *destination, int size)
{
#ifndef __EMSCRIPTEN__
    char ramFilename[FILENAME_MAX];
    getRamFilename(ramFilename);
    FILE *file = fopen_utf8(ramFilename, "rb");
    if (file)
    {
        fread(destination, sizeof(uint8_t), size, file);
        fclose(file);
    }
#endif
}
void persistentRamWillAccess ( void * context , uint8_t * destination , int size ) { #ifndef __EMSCRIPTEN__ char ramFilename [ FILENAME_MAX ] ; getRamFilename ( ramFilename ) ; FILE * file = fopen_utf8 ( ramFilename , " " ) ; if ( file ) { fread ( destination , sizeof ( uint8_t ) , size , file ) ; fclose ( file ) ; } #endif }
Called when persistent RAM will be accessed the first time
Called when persistent RAM will be accessed the first time