diff --git a/src/BizHawk.Client.Common/IDialogController.cs b/src/BizHawk.Client.Common/IDialogController.cs
index 2ea6edb0d7..d2e489c360 100644
--- a/src/BizHawk.Client.Common/IDialogController.cs
+++ b/src/BizHawk.Client.Common/IDialogController.cs
@@ -6,7 +6,7 @@ namespace BizHawk.Client.Common
{
public interface IDialogController
{
- void AddOnScreenMessage(string message);
+ void AddOnScreenMessage(string message, int? duration = null);
/// Creates and shows a System.Windows.Forms.OpenFileDialog or equivalent
/// parent window
diff --git a/src/BizHawk.Client.Common/RomLoader.cs b/src/BizHawk.Client.Common/RomLoader.cs
index 3bf2e185f6..9c00ce12ef 100644
--- a/src/BizHawk.Client.Common/RomLoader.cs
+++ b/src/BizHawk.Client.Common/RomLoader.cs
@@ -105,7 +105,7 @@ namespace BizHawk.Client.Common
}
// For not throwing errors but simply outputting information to the screen
- public Action MessageCallback { get; set; }
+ public Action MessageCallback { get; set; }
// TODO: reconsider the need for exposing these;
public IEmulator LoadedEmulator { get; private set; }
diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs
index 95a2d060f7..beedac21ff 100644
--- a/src/BizHawk.Client.EmuHawk/MainForm.cs
+++ b/src/BizHawk.Client.EmuHawk/MainForm.cs
@@ -976,7 +976,7 @@ namespace BizHawk.Client.EmuHawk
///
public static bool DisableSecondaryThrottling { get; set; }
- public void AddOnScreenMessage(string message) => OSD.AddMessage(message);
+ public void AddOnScreenMessage(string message, int? duration = null) => OSD.AddMessage(message, duration);
public void ClearHolds()
{
diff --git a/src/BizHawk.Emulation.Common/CoreComms.cs b/src/BizHawk.Emulation.Common/CoreComms.cs
index 2bdb2fb4bb..9c7410dd4b 100644
--- a/src/BizHawk.Emulation.Common/CoreComms.cs
+++ b/src/BizHawk.Emulation.Common/CoreComms.cs
@@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Common
{
public CoreComm(
Action showMessage,
- Action notifyMessage,
+ Action notifyMessage,
ICoreFileProvider coreFileProvider,
CorePreferencesFlags prefs
)
@@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Common
///
/// Gets a message to show. less annoying (OSD message). Should be used for ignorable helpful messages
///
- public Action Notify { get; }
+ public Action Notify { get; }
[Flags]
public enum CorePreferencesFlags
diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs
index ceca229ed4..4906b65860 100644
--- a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs
+++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
+using System.Text.RegularExpressions;
using System.Runtime.InteropServices;
using System.Text;
@@ -33,7 +34,7 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME
_infoCallback = info =>
{
var text = info.Replace(". ", "\n").Replace("\n\n", "\n");
- lp.Comm.Notify(text);
+ lp.Comm.Notify(text, 4 * Regex.Matches(text, "\n").Count);
RomDetails =
_gameFullName + "\r\n\r\n" +
text + (text == "" ? "" : "\r\n") +
diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.Messaging.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.Messaging.cs
index 7af587d540..1784863046 100644
--- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.Messaging.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.Messaging.cs
@@ -39,7 +39,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
break;
}
- CoreComm.Notify(sb.ToString());
+ CoreComm.Notify(sb.ToString(), null);
}
///
diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Messaging.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Messaging.cs
index 9d0e1f35dd..e7d39aadda 100644
--- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Messaging.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.Messaging.cs
@@ -40,7 +40,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
break;
}
- CoreComm.Notify(sb.ToString());
+ CoreComm.Notify(sb.ToString(), null);
}
///
diff --git a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs
index 4682302f2f..f9ccaa0a70 100644
--- a/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs
+++ b/src/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/ZXSpectrum.cs
@@ -52,7 +52,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
{
if (!DeterministicEmulation)
{
- CoreComm.Notify("Forcing Deterministic Emulation");
+ CoreComm.Notify("Forcing Deterministic Emulation", null);
}
DeterministicEmulation = lp.DeterministicEmulationRequested;
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IEmulator.cs
index 8234d5cc75..ccc1722a5b 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IEmulator.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/SameBoy/SameBoy.IEmulator.cs
@@ -47,7 +47,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Sameboy
{
_curTrack--;
LibSameboy.sameboy_switchgbstrack(SameboyState, _curTrack);
- Comm.Notify($"Switching to Track {_curTrack}");
+ Comm.Notify($"Switching to Track {_curTrack}", null);
}
}
else if (nextTrack)
@@ -56,7 +56,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Sameboy
{
_curTrack++;
LibSameboy.sameboy_switchgbstrack(SameboyState, _curTrack);
- Comm.Notify($"Switching to Track {_curTrack}");
+ Comm.Notify($"Switching to Track {_curTrack}", null);
}
}
}
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs
index 7d07fc77e9..9aac3847fa 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/SMS/SMS.cs
@@ -48,7 +48,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
if (game["PAL"] && Region != DisplayType.PAL)
{
Region = DisplayType.PAL;
- comm.Notify("Display was forced to PAL mode for game compatibility.");
+ comm.Notify("Display was forced to PAL mode for game compatibility.", null);
}
if (IsGameGear)
@@ -65,13 +65,13 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
if (game["Japan"] && _region != SmsSyncSettings.Regions.Japan)
{
_region = SmsSyncSettings.Regions.Japan;
- comm.Notify("Region was forced to Japan for game compatibility.");
+ comm.Notify("Region was forced to Japan for game compatibility.", null);
}
if (game["Korea"] && _region != SmsSyncSettings.Regions.Korea)
{
_region = SmsSyncSettings.Regions.Korea;
- comm.Notify("Region was forced to Korea for game compatibility.");
+ comm.Notify("Region was forced to Korea for game compatibility.", null);
}
if ((game.NotInDatabase || game["FM"]) && SyncSettings.EnableFm && !IsGameGear)
diff --git a/src/BizHawk.Emulation.Cores/Libretro/Libretro.IEmulator.cs b/src/BizHawk.Emulation.Cores/Libretro/Libretro.IEmulator.cs
index eb0f65a634..e559b30222 100644
--- a/src/BizHawk.Emulation.Cores/Libretro/Libretro.IEmulator.cs
+++ b/src/BizHawk.Emulation.Cores/Libretro/Libretro.IEmulator.cs
@@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Libretro
private LibretroApi.retro_message retro_msg = default;
- private readonly Action _notify;
+ private readonly Action _notify;
private void FrameAdvancePrep(IController controller)
{
@@ -55,7 +55,7 @@ namespace BizHawk.Emulation.Cores.Libretro
if (retro_msg.frames > 0)
{
// TODO: pass frames for duration?
- _notify(Mershul.PtrToStringUtf8(retro_msg.msg));
+ _notify(Mershul.PtrToStringUtf8(retro_msg.msg), null);
}
Frame++;