MCPcopy Create free account
hub / github.com/Stewmath/GameYob / flushFatCache

Function flushFatCache

arm9/source/inputhelper.cpp:80–85  ·  view source on GitHub ↗

This function is supposed to flush the cache so I don't have to fclose() and fopen() a file in order to save it. But I found I could not rely on it in the gameboySyncAutosave() function.

Source from the content-addressed store, hash-verified

78// a file in order to save it.
79// But I found I could not rely on it in the gameboySyncAutosave() function.
80void flushFatCache() {
81 // This involves things from libfat which aren't normally visible
82 devoptab_t* devops = (devoptab_t*)GetDeviceOpTab ("sd");
83 PARTITION* partition = (PARTITION*)devops->deviceData;
84 _FAT_cache_flush(partition->cache); // Flush the cache manually
85}
86
87const char* gbKeyNames[] = {"-","A","B","Left","Right","Up","Down","Start","Select",
88 "Menu","Menu/Pause","Save","Autofire A","Autofire B", "Fast Forward", "FF Toggle", "Scale","Reset"};

Callers 1

saveGameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected