예제 #1
0
void saveSettingsFunc(int value) {
    printMenuMessage("Saving settings...");
    muteSND();
    writeConfigFile();
    refreshSND();
    printMenuMessage("Settings saved.");
}
예제 #2
0
void stateSaveFunc(int value) {
    printMenuMessage("Saving state...");
    muteSND();
    saveState(stateNum);
    refreshSND();
    printMenuMessage("State saved.");
    // Will activate the other state options
    stateSelectFunc(stateNum);
}
예제 #3
0
void suspendFunc(int value) {
    muteSND();
    if (!autoSavingEnabled) {
        printMenuMessage("Saving SRAM...");
        saveGame();
    }
    printMenuMessage("Saving state...");
    saveState(-1);
    printMessage[0] = '\0';
    closeMenu();
    selectRom();
}
예제 #4
0
void nifiEnableFunc(int value) {
    if (value) {
		printMenuMessage("Warning: link emulation sucks.");
        enableNifi();
	}
    else
        disableNifi();
}
예제 #5
0
void stateLoadFunc(int value) {
    printMenuMessage("Loading state...");
    muteSND();
    if (loadState(stateNum) == 0) {
        closeMenu();
        updateScreens();
        printMessage[0] = '\0';
    }
}
예제 #6
0
void exitFunc(int value) {
    muteSND();
    if (!autoSavingEnabled && numRamBanks && !gbsMode) {
        printMenuMessage("Saving SRAM...");
        saveGame();
    }
    printMessage[0] = '\0';
    closeMenu();
    selectRom();
}
예제 #7
0
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);
}
예제 #8
0
void cheatFunc(int value) {
    if (!startCheatMenu())
        printMenuMessage("No cheats found!");
}