void saveSettingsFunc(int value) { printMenuMessage("Saving settings..."); muteSND(); writeConfigFile(); refreshSND(); printMenuMessage("Settings saved."); }
void stateSaveFunc(int value) { printMenuMessage("Saving state..."); muteSND(); saveState(stateNum); refreshSND(); printMenuMessage("State saved."); // Will activate the other state options stateSelectFunc(stateNum); }
void suspendFunc(int value) { muteSND(); if (!autoSavingEnabled) { printMenuMessage("Saving SRAM..."); saveGame(); } printMenuMessage("Saving state..."); saveState(-1); printMessage[0] = '\0'; closeMenu(); selectRom(); }
void nifiEnableFunc(int value) { if (value) { printMenuMessage("Warning: link emulation sucks."); enableNifi(); } else disableNifi(); }
void stateLoadFunc(int value) { printMenuMessage("Loading state..."); muteSND(); if (loadState(stateNum) == 0) { closeMenu(); updateScreens(); printMessage[0] = '\0'; } }
void exitFunc(int value) { muteSND(); if (!autoSavingEnabled && numRamBanks && !gbsMode) { printMenuMessage("Saving SRAM..."); saveGame(); } printMessage[0] = '\0'; closeMenu(); selectRom(); }
void writeConfigFile() { FileHandle* file = file_open(INI_PATH, "w"); if (file == NULL) { printMenuMessage("Error opening gameyob.ini."); return; } file_printf(file, "[general]\n"); generalPrintConfig(file); file_printf(file, "[console]\n"); menuPrintConfig(file); file_printf(file, "[controls]\n"); controlsPrintConfig(file); file_close(file); char nameBuf[MAX_FILENAME_LEN]; sprintf(nameBuf, "%s.cht", gameboy->getRomFile()->getBasename()); gameboy->getCheatEngine()->saveCheats(nameBuf); }
void cheatFunc(int value) { if (!startCheatMenu()) printMenuMessage("No cheats found!"); }