private async Task saveStateDataAsync(SaveStateData data) { if (this.currentROM == null) { throw new InvalidOperationException("No ROM loaded."); } String extension = String.Format(this.info.SaveStateExtension, data.slot); var file = await this.GetFileUsingExtension(extension, true); await this.WriteBytesToFileAsync(file, data.data); }
public IAsyncAction SaveStateDataAsync(SaveStateData data) { return(this.saveStateDataAsync(data).AsAsyncAction()); }