internal async Task StartROM(ROMEntry rom) { this.RemoveOldEventHandlers(); this.currentROM = rom; UpdateDBEntry(rom); this.mainView.ShowEmulatorPage(); IROMData data = await StartNewROM(); if (data != null) { await LoadCheats(); } }
private async Task <IROMData> StartNewROM() { await this.StopROMAsync(); IROMData data = null; try { data = ROMData.FromUtility(await StorageManager.Current.LoadROMAsync(this.currentROM)); await this.emulator.LoadROMAsync(data); } catch (IOException) { this.currentROM = null; data = null; await this.messageService.ShowMessage(this.resources.GetString("invalidROMData"), this.resources.GetString("errorCaption")); } return(data); }