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.
| 78 | // a file in order to save it. |
| 79 | // But I found I could not rely on it in the gameboySyncAutosave() function. |
| 80 | void 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 | |
| 87 | const 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"}; |