From 14c4e1d9dea27d7ac59bcfb3876c2e26a69da367 Mon Sep 17 00:00:00 2001 From: William Date: Tue, 13 Jun 2023 01:22:45 +0100 Subject: [PATCH] Fix no emulator path being set not being detected when trying to Build & Run (#199) --- src/SerialLoops/MainForm.eto.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/SerialLoops/MainForm.eto.cs b/src/SerialLoops/MainForm.eto.cs index 4f5fd1f8..50ff37ba 100644 --- a/src/SerialLoops/MainForm.eto.cs +++ b/src/SerialLoops/MainForm.eto.cs @@ -727,11 +727,12 @@ private void BuildAndRunProject_Executed(object sender, EventArgs e) { if (OpenProject is not null) { - if (CurrentConfig.EmulatorPath is null) + if (string.IsNullOrWhiteSpace(CurrentConfig.EmulatorPath)) { - MessageBox.Show("No emulator path set. Please set the path to your emulator.", "No Emulator Path", - MessageBoxType.Warning); - Log.LogWarning("No emulator path set. Please set the path to your emulator."); + MessageBox.Show("No emulator path has been set.\nPlease set the path to a Nintendo DS emulator in Preferences to use Build & Run.", + "No Emulator Path", MessageBoxType.Warning); + Log.LogWarning("Attempted to build and run project while no emulator path was set."); + PreferencesCommand_Executed(sender, e); return; }