void GBACheatDeviceDestroy(struct GBACheatDevice* device) { size_t i; for (i = 0; i < GBACheatSetsSize(&device->cheats); ++i) { struct GBACheatSet* set = *GBACheatSetsGetPointer(&device->cheats, i); GBACheatSetDeinit(set); free(set); } GBACheatSetsDeinit(&device->cheats); }
void retro_cheat_reset(void) { GBACheatSetDeinit(&cheatSet); GBACheatSetInit(&cheatSet, "libretro"); }
void retro_deinit(void) { GBACheatRemoveSet(&cheats, &cheatSet); GBACheatDeviceDestroy(&cheats); GBACheatSetDeinit(&cheatSet); free(outputBuffer); }