Esempio n. 1
0
void save() {
  if (fileSaved) {
    printer.printString("Saved "+loadedFilename);
    return;
  }
  if (loadedFilename.empty()) {
    saveAs();
  } else {
    saveRamToFile(loadedFilename);
    fileSaved = true;
    printer.printString("Saved "+loadedFilename);
    redrawScreen();
  }
}
Esempio n. 2
0
void saveAs() {
  string fileName = getFreeFileName();
  saveRamToFile(fileName);
  loadedFilename = fileName;
  fileSaved = true;
  printer.printString("Saved as "+fileName);
  redrawScreen();
}