systemMessage(MSG_CANNOT_OPEN_FILE, "Cannot open file %s", fileName);
systemMessage(MSG_CANNOT_OPEN_FILE, N_("Cannot open file %s"), fileName);
bool gbReadGSASnapshot(const char *fileName){  FILE *file = fopen(fileName, "rb");      if(!file) {    systemMessage(MSG_CANNOT_OPEN_FILE, "Cannot open file %s", fileName);    return false;  }    //  long size = ftell(file);  fseek(file, 0x4, SEEK_SET);  char buffer[16];  char buffer2[16];  fread(buffer, 1, 15, file);  buffer[15] = 0;  memcpy(buffer2, &gbRom[0x134], 15);  buffer2[15] = 0;  if(memcmp(buffer, buffer2, 15)) {    systemMessage(MSG_CANNOT_IMPORT_SNAPSHOT_FOR,                  "Cannot import snapshot for %s. Current game is %s",                  buffer,                  buffer2);    fclose(file);    return false;  }  fseek(file, 0x13, SEEK_SET);  int read = 0;  int toRead = 0;  switch(gbRom[0x147]) {  case 0x03:  case 0x0f:  case 0x10:  case 0x13:  case 0x1b:  case 0x1e:  case 0xff:    read = fread(gbRam, 1, gbRamSize, file);    toRead = gbRamSize;    break;  case 0x06:  case 0x22:    read = fread(&gbMemory[0xa000],1,256,file);    toRead = 256;    break;  default:    systemMessage(MSG_UNSUPPORTED_SNAPSHOT_FILE,                  "Unsupported snapshot file %s",                  fileName);    fclose(file);    return false;  }      fclose(file);  gbReset();  return true;  }