Exemplo 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();
  }
}
Exemplo n.º 2
0
void saveAs() {
  string fileName = getFreeFileName();
  saveRamToFile(fileName);
  loadedFilename = fileName;
  fileSaved = true;
  printer.printString("Saved as "+fileName);
  redrawScreen();
}