Mainform - use OnScreen method instead of GlobalWin.OSD references

This commit is contained in:
adelikat 2019-12-17 14:46:22 -06:00
parent 23f7274541
commit fb8ff37fe9
1 changed files with 71 additions and 81 deletions

View File

@ -980,40 +980,32 @@ namespace BizHawk.Client.EmuHawk
public byte[] CurrentFrameBuffer(bool captureOSD) public byte[] CurrentFrameBuffer(bool captureOSD)
{ {
using (var bb = captureOSD ? CaptureOSD() : MakeScreenshotImage()) using var bb = captureOSD ? CaptureOSD() : MakeScreenshotImage();
{ using var img = bb.ToSysdrawingBitmap();
using (var img = bb.ToSysdrawingBitmap())
{
ImageConverter converter = new ImageConverter(); ImageConverter converter = new ImageConverter();
return (byte[])converter.ConvertTo(img, typeof(byte[])); return (byte[])converter.ConvertTo(img, typeof(byte[]));
} }
}
}
public void TakeScreenshotToClipboard() public void TakeScreenshotToClipboard()
{ {
using (var bb = Global.Config.Screenshot_CaptureOSD ? CaptureOSD() : MakeScreenshotImage()) using (var bb = Global.Config.Screenshot_CaptureOSD ? CaptureOSD() : MakeScreenshotImage())
{ {
using (var img = bb.ToSysdrawingBitmap()) using var img = bb.ToSysdrawingBitmap();
{
Clipboard.SetImage(img); Clipboard.SetImage(img);
} }
}
GlobalWin.OSD.AddMessage("Screenshot (raw) saved to clipboard."); AddOnScreenMessage("Screenshot (raw) saved to clipboard.");
} }
private void TakeScreenshotClientToClipboard() private void TakeScreenshotClientToClipboard()
{ {
using (var bb = GlobalWin.DisplayManager.RenderOffscreen(_currentVideoProvider, Global.Config.Screenshot_CaptureOSD)) using (var bb = GlobalWin.DisplayManager.RenderOffscreen(_currentVideoProvider, Global.Config.Screenshot_CaptureOSD))
{ {
using (var img = bb.ToSysdrawingBitmap()) using var img = bb.ToSysdrawingBitmap();
{
Clipboard.SetImage(img); Clipboard.SetImage(img);
} }
}
GlobalWin.OSD.AddMessage("Screenshot (client) saved to clipboard."); AddOnScreenMessage("Screenshot (client) saved to clipboard.");
} }
public void TakeScreenshot() public void TakeScreenshot()
@ -1048,17 +1040,15 @@ namespace BizHawk.Client.EmuHawk
using (var bb = Global.Config.Screenshot_CaptureOSD ? CaptureOSD() : MakeScreenshotImage()) using (var bb = Global.Config.Screenshot_CaptureOSD ? CaptureOSD() : MakeScreenshotImage())
{ {
using (var img = bb.ToSysdrawingBitmap()) using var img = bb.ToSysdrawingBitmap();
{
img.Save(fi.FullName, ImageFormat.Png); img.Save(fi.FullName, ImageFormat.Png);
} }
}
/* /*
using (var fs = new FileStream($"{path}_test.bmp", FileMode.OpenOrCreate, FileAccess.Write)) using (var fs = new FileStream($"{path}_test.bmp", FileMode.OpenOrCreate, FileAccess.Write))
QuickBmpFile.Save(Emulator.VideoProvider(), fs, r.Next(50, 500), r.Next(50, 500)); QuickBmpFile.Save(Emulator.VideoProvider(), fs, r.Next(50, 500), r.Next(50, 500));
*/ */
GlobalWin.OSD.AddMessage($"{fi.Name} saved."); AddOnScreenMessage($"{fi.Name} saved.");
} }
public void FrameBufferResized() public void FrameBufferResized()
@ -1262,12 +1252,12 @@ namespace BizHawk.Client.EmuHawk
string xtype = _unthrottled ? "Unthrottled" : "Throttled"; string xtype = _unthrottled ? "Unthrottled" : "Throttled";
string msg = $"{xtype}{ttype} "; string msg = $"{xtype}{ttype} ";
GlobalWin.OSD.AddMessage(msg); AddOnScreenMessage(msg);
} }
public void FrameSkipMessage() public void FrameSkipMessage()
{ {
GlobalWin.OSD.AddMessage($"Frameskipping set to {Global.Config.FrameSkip}"); AddOnScreenMessage($"Frameskipping set to {Global.Config.FrameSkip}");
} }
public void UpdateCheatStatus() public void UpdateCheatStatus()
@ -1342,7 +1332,7 @@ namespace BizHawk.Client.EmuHawk
((Snes9x)Emulator).PutSettings(s); ((Snes9x)Emulator).PutSettings(s);
} }
GlobalWin.OSD.AddMessage($"BG {layer} Layer {(result ? "On" : "Off")}"); AddOnScreenMessage($"BG {layer} Layer {(result ? "On" : "Off")}");
} }
private void SNES_ToggleObj(int layer) private void SNES_ToggleObj(int layer)
@ -1378,11 +1368,11 @@ namespace BizHawk.Client.EmuHawk
} }
((LibsnesCore)Emulator).PutSettings(s); ((LibsnesCore)Emulator).PutSettings(s);
GlobalWin.OSD.AddMessage($"Obj {layer} Layer {(result ? "On" : "Off")}"); AddOnScreenMessage($"Obj {layer} Layer {(result ? "On" : "Off")}");
} }
else if (Emulator is Snes9x) else if (Emulator is Snes9x snes9X)
{ {
var s = ((Snes9x)Emulator).GetSettings(); var s = snes9X.GetSettings();
switch (layer) switch (layer)
{ {
case 1: case 1:
@ -1399,8 +1389,8 @@ namespace BizHawk.Client.EmuHawk
break; break;
} }
((Snes9x)Emulator).PutSettings(s); snes9X.PutSettings(s);
GlobalWin.OSD.AddMessage($"Sprite {layer} Layer {(result ? "On" : "Off")}"); AddOnScreenMessage($"Sprite {layer} Layer {(result ? "On" : "Off")}");
} }
} }
@ -1568,7 +1558,7 @@ namespace BizHawk.Client.EmuHawk
private void ClearAutohold() private void ClearAutohold()
{ {
ClearHolds(); ClearHolds();
GlobalWin.OSD.AddMessage("Autohold keys cleared"); AddOnScreenMessage("Autohold keys cleared");
} }
private static void UpdateToolsLoadstate() private static void UpdateToolsLoadstate()
@ -1663,7 +1653,7 @@ namespace BizHawk.Client.EmuHawk
var autosave = new FileInfo(PathManager.AutoSaveRamPath(Global.Game)); var autosave = new FileInfo(PathManager.AutoSaveRamPath(Global.Game));
if (autosave.Exists && autosave.LastWriteTime > saveram.LastWriteTime) if (autosave.Exists && autosave.LastWriteTime > saveram.LastWriteTime)
{ {
GlobalWin.OSD.AddMessage("AutoSaveRAM is newer than last saved SaveRAM"); AddOnScreenMessage("AutoSaveRAM is newer than last saved SaveRAM");
} }
} }
@ -1700,7 +1690,7 @@ namespace BizHawk.Client.EmuHawk
} }
catch (IOException) catch (IOException)
{ {
GlobalWin.OSD.AddMessage("An error occurred while loading Sram"); AddOnScreenMessage("An error occurred while loading Sram");
} }
} }
} }
@ -1732,7 +1722,7 @@ namespace BizHawk.Client.EmuHawk
} }
catch catch
{ {
GlobalWin.OSD.AddMessage($"Unable to flush SaveRAM to: {newFile.Directory}"); AddOnScreenMessage($"Unable to flush SaveRAM to: {newFile.Directory}");
return false; return false;
} }
} }
@ -2072,14 +2062,14 @@ namespace BizHawk.Client.EmuHawk
{ {
Global.Config.SpeedPercentAlternate = value; Global.Config.SpeedPercentAlternate = value;
SyncThrottle(); SyncThrottle();
GlobalWin.OSD.AddMessage($"Alternate Speed: {value}%"); AddOnScreenMessage($"Alternate Speed: {value}%");
} }
private void SetSpeedPercent(int value) private void SetSpeedPercent(int value)
{ {
Global.Config.SpeedPercent = value; Global.Config.SpeedPercent = value;
SyncThrottle(); SyncThrottle();
GlobalWin.OSD.AddMessage($"Speed: {value}%"); AddOnScreenMessage($"Speed: {value}%");
} }
private void Shutdown() private void Shutdown()
@ -2126,7 +2116,7 @@ namespace BizHawk.Client.EmuHawk
int slot = Global.Config.SaveSlot; int slot = Global.Config.SaveSlot;
string emptyPart = _stateSlots.HasSlot(slot) ? "" : " (empty)"; string emptyPart = _stateSlots.HasSlot(slot) ? "" : " (empty)";
string message = $"Slot {slot}{emptyPart} selected."; string message = $"Slot {slot}{emptyPart} selected.";
GlobalWin.OSD.AddMessage(message); AddOnScreenMessage(message);
} }
private void Render() private void Render()
@ -2374,7 +2364,7 @@ namespace BizHawk.Client.EmuHawk
var settable = new SettingsAdapter(Emulator); var settable = new SettingsAdapter(Emulator);
if (Global.MovieSession.Movie.IsActive) if (Global.MovieSession.Movie.IsActive)
{ {
GlobalWin.OSD.AddMessage("Attempt to change sync-relevant settings while recording BLOCKED."); AddOnScreenMessage("Attempt to change sync-relevant settings while recording BLOCKED.");
} }
else if (settable.HasSyncSettings && settable.PutSyncSettings(o)) else if (settable.HasSyncSettings && settable.PutSyncSettings(o))
{ {
@ -2442,7 +2432,7 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.Sound.StartSound(); GlobalWin.Sound.StartSound();
} }
private static void VolumeUp() private void VolumeUp()
{ {
Global.Config.SoundVolume += 10; Global.Config.SoundVolume += 10;
if (Global.Config.SoundVolume > 100) if (Global.Config.SoundVolume > 100)
@ -2450,10 +2440,10 @@ namespace BizHawk.Client.EmuHawk
Global.Config.SoundVolume = 100; Global.Config.SoundVolume = 100;
} }
GlobalWin.OSD.AddMessage($"Volume {Global.Config.SoundVolume}"); AddOnScreenMessage($"Volume {Global.Config.SoundVolume}");
} }
private static void VolumeDown() private void VolumeDown()
{ {
Global.Config.SoundVolume -= 10; Global.Config.SoundVolume -= 10;
if (Global.Config.SoundVolume < 0) if (Global.Config.SoundVolume < 0)
@ -2461,7 +2451,7 @@ namespace BizHawk.Client.EmuHawk
Global.Config.SoundVolume = 0; Global.Config.SoundVolume = 0;
} }
GlobalWin.OSD.AddMessage($"Volume {Global.Config.SoundVolume}"); AddOnScreenMessage($"Volume {Global.Config.SoundVolume}");
} }
private void SoftReset() private void SoftReset()
@ -2472,7 +2462,7 @@ namespace BizHawk.Client.EmuHawk
if (!Global.MovieSession.Movie.IsPlaying || Global.MovieSession.Movie.IsFinished) if (!Global.MovieSession.Movie.IsPlaying || Global.MovieSession.Movie.IsFinished)
{ {
Global.ClickyVirtualPadController.Click("Reset"); Global.ClickyVirtualPadController.Click("Reset");
GlobalWin.OSD.AddMessage("Reset button pressed."); AddOnScreenMessage("Reset button pressed.");
} }
} }
} }
@ -2485,7 +2475,7 @@ namespace BizHawk.Client.EmuHawk
if (!Global.MovieSession.Movie.IsPlaying || Global.MovieSession.Movie.IsFinished) if (!Global.MovieSession.Movie.IsPlaying || Global.MovieSession.Movie.IsFinished)
{ {
Global.ClickyVirtualPadController.Click("Power"); Global.ClickyVirtualPadController.Click("Power");
GlobalWin.OSD.AddMessage("Power button pressed."); AddOnScreenMessage("Power button pressed.");
} }
} }
} }
@ -2576,7 +2566,7 @@ namespace BizHawk.Client.EmuHawk
return; return;
} }
GlobalWin.OSD.AddMessage($"Screensize set to {Global.Config.TargetZoomFactors[Emulator.SystemId]}x"); AddOnScreenMessage($"Screensize set to {Global.Config.TargetZoomFactors[Emulator.SystemId]}x");
FrameBufferResized(); FrameBufferResized();
} }
@ -2603,7 +2593,7 @@ namespace BizHawk.Client.EmuHawk
return; return;
} }
GlobalWin.OSD.AddMessage($"Screensize set to {Global.Config.TargetZoomFactors[Emulator.SystemId]}x"); AddOnScreenMessage($"Screensize set to {Global.Config.TargetZoomFactors[Emulator.SystemId]}x");
FrameBufferResized(); FrameBufferResized();
} }
@ -2613,7 +2603,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (!Global.Config.ClockThrottle) if (!Global.Config.ClockThrottle)
{ {
GlobalWin.OSD.AddMessage("Unable to change speed, please switch to clock throttle"); AddOnScreenMessage("Unable to change speed, please switch to clock throttle");
return; return;
} }
@ -2635,7 +2625,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (!Global.Config.ClockThrottle) if (!Global.Config.ClockThrottle)
{ {
GlobalWin.OSD.AddMessage("Unable to change speed, please switch to clock throttle"); AddOnScreenMessage("Unable to change speed, please switch to clock throttle");
return; return;
} }
@ -2653,12 +2643,12 @@ namespace BizHawk.Client.EmuHawk
SetSpeedPercent(newp); SetSpeedPercent(newp);
} }
private static void SaveMovie() private void SaveMovie()
{ {
if (Global.MovieSession.Movie.IsActive) if (Global.MovieSession.Movie.IsActive)
{ {
Global.MovieSession.Movie.Save(); Global.MovieSession.Movie.Save();
GlobalWin.OSD.AddMessage($"{Global.MovieSession.Movie.Filename} saved."); AddOnScreenMessage($"{Global.MovieSession.Movie.Filename} saved.");
} }
} }
@ -2730,21 +2720,21 @@ namespace BizHawk.Client.EmuHawk
} }
} }
private static void ToggleModePokeMode() private void ToggleModePokeMode()
{ {
Global.Config.MoviePlaybackPokeMode ^= true; Global.Config.MoviePlaybackPokeMode ^= true;
GlobalWin.OSD.AddMessage($"Movie Poke mode {(Global.Config.MoviePlaybackPokeMode ? "enabled" : "disabled")}"); AddOnScreenMessage($"Movie Poke mode {(Global.Config.MoviePlaybackPokeMode ? "enabled" : "disabled")}");
} }
private static void ToggleBackgroundInput() private void ToggleBackgroundInput()
{ {
Global.Config.AcceptBackgroundInput ^= true; Global.Config.AcceptBackgroundInput ^= true;
GlobalWin.OSD.AddMessage($"Background Input {(Global.Config.AcceptBackgroundInput ? "enabled" : "disabled")}"); AddOnScreenMessage($"Background Input {(Global.Config.AcceptBackgroundInput ? "enabled" : "disabled")}");
} }
private static void VsyncMessage() private void VsyncMessage()
{ {
GlobalWin.OSD.AddMessage($"Display Vsync set to {(Global.Config.VSync ? "on" : "off")}"); AddOnScreenMessage($"Display Vsync set to {(Global.Config.VSync ? "on" : "off")}");
} }
private static bool StateErrorAskUser(string title, string message) private static bool StateErrorAskUser(string title, string message)
@ -2767,7 +2757,7 @@ namespace BizHawk.Client.EmuHawk
if (!Global.MovieSession.Movie.IsPlaying || Global.MovieSession.Movie.IsFinished) if (!Global.MovieSession.Movie.IsPlaying || Global.MovieSession.Movie.IsFinished)
{ {
Global.ClickyVirtualPadController.Click(button); Global.ClickyVirtualPadController.Click(button);
GlobalWin.OSD.AddMessage(msg); AddOnScreenMessage(msg);
} }
} }
}); });
@ -2845,13 +2835,13 @@ namespace BizHawk.Client.EmuHawk
switch (Global.Config.Input_Hotkey_OverrideOptions) switch (Global.Config.Input_Hotkey_OverrideOptions)
{ {
case 0: case 0:
GlobalWin.OSD.AddMessage("Key priority set to Both Hotkey and Input"); AddOnScreenMessage("Key priority set to Both Hotkey and Input");
break; break;
case 1: case 1:
GlobalWin.OSD.AddMessage("Key priority set to Input over Hotkey"); AddOnScreenMessage("Key priority set to Input over Hotkey");
break; break;
case 2: case 2:
GlobalWin.OSD.AddMessage("Key priority set to Input"); AddOnScreenMessage("Key priority set to Input");
break; break;
} }
} }
@ -3231,7 +3221,7 @@ namespace BizHawk.Client.EmuHawk
if (aw == null) if (aw == null)
{ {
GlobalWin.OSD.AddMessage( AddOnScreenMessage(
unattended ? $"Couldn't start video writer \"{videoWriterName}\"" : "A/V capture canceled."); unattended ? $"Couldn't start video writer \"{videoWriterName}\"" : "A/V capture canceled.");
return; return;
@ -3280,7 +3270,7 @@ namespace BizHawk.Client.EmuHawk
var token = aw.AcquireVideoCodecToken(this); var token = aw.AcquireVideoCodecToken(this);
if (token == null) if (token == null)
{ {
GlobalWin.OSD.AddMessage("A/V capture canceled."); AddOnScreenMessage("A/V capture canceled.");
aw.Dispose(); aw.Dispose();
return; return;
} }
@ -3341,14 +3331,14 @@ namespace BizHawk.Client.EmuHawk
// commit the avi writing last, in case there were any errors earlier // commit the avi writing last, in case there were any errors earlier
_currAviWriter = aw; _currAviWriter = aw;
GlobalWin.OSD.AddMessage("A/V capture started"); AddOnScreenMessage("A/V capture started");
AVIStatusLabel.Image = Properties.Resources.AVI; AVIStatusLabel.Image = Properties.Resources.AVI;
AVIStatusLabel.ToolTipText = "A/V capture in progress"; AVIStatusLabel.ToolTipText = "A/V capture in progress";
AVIStatusLabel.Visible = true; AVIStatusLabel.Visible = true;
} }
catch catch
{ {
GlobalWin.OSD.AddMessage("A/V capture failed!"); AddOnScreenMessage("A/V capture failed!");
aw.Dispose(); aw.Dispose();
throw; throw;
} }
@ -3386,7 +3376,7 @@ namespace BizHawk.Client.EmuHawk
_currAviWriter.Dispose(); _currAviWriter.Dispose();
_currAviWriter = null; _currAviWriter = null;
GlobalWin.OSD.AddMessage("A/V capture aborted"); AddOnScreenMessage("A/V capture aborted");
AVIStatusLabel.Image = Properties.Resources.Blank; AVIStatusLabel.Image = Properties.Resources.Blank;
AVIStatusLabel.ToolTipText = ""; AVIStatusLabel.ToolTipText = "";
AVIStatusLabel.Visible = false; AVIStatusLabel.Visible = false;
@ -3407,7 +3397,7 @@ namespace BizHawk.Client.EmuHawk
_currAviWriter.CloseFile(); _currAviWriter.CloseFile();
_currAviWriter.Dispose(); _currAviWriter.Dispose();
_currAviWriter = null; _currAviWriter = null;
GlobalWin.OSD.AddMessage("A/V capture stopped"); AddOnScreenMessage("A/V capture stopped");
AVIStatusLabel.Image = Properties.Resources.Blank; AVIStatusLabel.Image = Properties.Resources.Blank;
AVIStatusLabel.ToolTipText = ""; AVIStatusLabel.ToolTipText = "";
AVIStatusLabel.Visible = false; AVIStatusLabel.Visible = false;
@ -3579,7 +3569,7 @@ namespace BizHawk.Client.EmuHawk
private void NotifyCoreComm(string message) private void NotifyCoreComm(string message)
{ {
GlobalWin.OSD.AddMessage(message); AddOnScreenMessage(message);
} }
private string ChoosePlatformForRom(RomGame rom) private string ChoosePlatformForRom(RomGame rom)
@ -3819,7 +3809,7 @@ namespace BizHawk.Client.EmuHawk
} }
else if (Global.Config.AutosaveSaveRAM && File.Exists(PathManager.AutoSaveRamPath(loader.Game))) else if (Global.Config.AutosaveSaveRAM && File.Exists(PathManager.AutoSaveRamPath(loader.Game)))
{ {
GlobalWin.OSD.AddMessage("AutoSaveRAM found, but SaveRAM was not saved"); AddOnScreenMessage("AutoSaveRAM found, but SaveRAM was not saved");
} }
} }
@ -3831,7 +3821,7 @@ namespace BizHawk.Client.EmuHawk
Global.CheatList.SetDefaultFileName(ToolManager.GenerateDefaultCheatFilename()); Global.CheatList.SetDefaultFileName(ToolManager.GenerateDefaultCheatFilename());
if (Global.CheatList.AttemptToLoadCheatFile()) if (Global.CheatList.AttemptToLoadCheatFile())
{ {
GlobalWin.OSD.AddMessage("Cheats file loaded"); AddOnScreenMessage("Cheats file loaded");
} }
else if (Global.CheatList.Any()) else if (Global.CheatList.Any())
{ {
@ -3934,7 +3924,7 @@ namespace BizHawk.Client.EmuHawk
if (File.Exists(path)) if (File.Exists(path))
{ {
File.Delete(path); File.Delete(path);
GlobalWin.OSD.AddMessage("SRAM cleared."); AddOnScreenMessage("SRAM cleared.");
} }
} }
else if (Emulator.HasSaveRam() && Emulator.AsSaveRam().SaveRamModified) else if (Emulator.HasSaveRam() && Emulator.AsSaveRam().SaveRamModified)
@ -4016,10 +4006,10 @@ namespace BizHawk.Client.EmuHawk
if (result.Warnings.Any()) if (result.Warnings.Any())
{ {
GlobalWin.OSD.AddMessage(result.Warnings.First()); // For now, just show the first warning AddOnScreenMessage(result.Warnings.First()); // For now, just show the first warning
} }
GlobalWin.OSD.AddMessage($"{Path.GetFileName(fn)} imported as {result.Movie.Filename}"); AddOnScreenMessage($"{Path.GetFileName(fn)} imported as {result.Movie.Filename}");
if (start) if (start)
{ {
@ -4031,7 +4021,7 @@ namespace BizHawk.Client.EmuHawk
public void EnableRewind(bool enabled) public void EnableRewind(bool enabled)
{ {
Global.Rewinder.SuspendRewind = !enabled; Global.Rewinder.SuspendRewind = !enabled;
GlobalWin.OSD.AddMessage($"Rewind {(enabled ? "enabled" : "suspended")}"); AddOnScreenMessage($"Rewind {(enabled ? "enabled" : "suspended")}");
} }
public void ClearRewindData() public void ClearRewindData()
@ -4111,12 +4101,12 @@ namespace BizHawk.Client.EmuHawk
if (!suppressOSD) if (!suppressOSD)
{ {
GlobalWin.OSD.AddMessage($"Loaded state: {userFriendlyStateName}"); AddOnScreenMessage($"Loaded state: {userFriendlyStateName}");
} }
} }
else else
{ {
GlobalWin.OSD.AddMessage("Loadstate error!"); AddOnScreenMessage("Loadstate error!");
} }
Global.MovieSession.Movie.IsCountingRerecords = wasCountingRerecords; Global.MovieSession.Movie.IsCountingRerecords = wasCountingRerecords;
@ -4144,7 +4134,7 @@ namespace BizHawk.Client.EmuHawk
var path = $"{PathManager.SaveStatePrefix(Global.Game)}.{quickSlotName}.State"; var path = $"{PathManager.SaveStatePrefix(Global.Game)}.{quickSlotName}.State";
if (!File.Exists(path)) if (!File.Exists(path))
{ {
GlobalWin.OSD.AddMessage($"Unable to load {quickSlotName}.State"); AddOnScreenMessage($"Unable to load {quickSlotName}.State");
return; return;
} }
@ -4173,12 +4163,12 @@ namespace BizHawk.Client.EmuHawk
if (!suppressOSD) if (!suppressOSD)
{ {
GlobalWin.OSD.AddMessage($"Saved state: {userFriendlyStateName}"); AddOnScreenMessage($"Saved state: {userFriendlyStateName}");
} }
} }
catch (IOException) catch (IOException)
{ {
GlobalWin.OSD.AddMessage($"Unable to save state {path}"); AddOnScreenMessage($"Unable to save state {path}");
} }
if (!fromLua) if (!fromLua)
@ -4404,11 +4394,11 @@ namespace BizHawk.Client.EmuHawk
if (Global.MovieSession.Movie.IsActive) if (Global.MovieSession.Movie.IsActive)
{ {
Global.MovieSession.ReadOnly ^= true; Global.MovieSession.ReadOnly ^= true;
GlobalWin.OSD.AddMessage(Global.MovieSession.ReadOnly ? "Movie read-only mode" : "Movie read+write mode"); AddOnScreenMessage(Global.MovieSession.ReadOnly ? "Movie read-only mode" : "Movie read+write mode");
} }
else else
{ {
GlobalWin.OSD.AddMessage("No movie active"); AddOnScreenMessage("No movie active");
} }
} }
} }