diff --git a/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/BizHawk.Client.Common/BizHawk.Client.Common.csproj index 398019161d..4a21b7b745 100644 --- a/BizHawk.Client.Common/BizHawk.Client.Common.csproj +++ b/BizHawk.Client.Common/BizHawk.Client.Common.csproj @@ -106,6 +106,7 @@ <Compile Include="lua\EmuLuaLibrary.Events.cs" /> <Compile Include="lua\EmuLuaLibrary.MainMemory.cs" /> <Compile Include="lua\EmuLuaLibrary.Memory.cs" /> + <Compile Include="lua\EmuLuaLibrary.Movie.cs" /> <Compile Include="lua\LuaDocumentation.cs" /> <Compile Include="lua\LuaFile.cs" /> <Compile Include="lua\LuaFunctionList.cs" /> diff --git a/BizHawk.MultiClient/tools/Lua/Libraries/EmuLuaLibrary.Movie.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.Movie.cs similarity index 85% rename from BizHawk.MultiClient/tools/Lua/Libraries/EmuLuaLibrary.Movie.cs rename to BizHawk.Client.Common/lua/EmuLuaLibrary.Movie.cs index 5fc9d440cb..09168d82d5 100644 --- a/BizHawk.MultiClient/tools/Lua/Libraries/EmuLuaLibrary.Movie.cs +++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.Movie.cs @@ -1,7 +1,6 @@ using LuaInterface; -using BizHawk.Client.Common; -namespace BizHawk.MultiClient +namespace BizHawk.Client.Common { public class MovieLuaLibrary : LuaLibraryBase { @@ -111,14 +110,8 @@ namespace BizHawk.MultiClient public static void movie_setreadonly(object lua_input) { - if (lua_input.ToString().ToUpper() == "TRUE" || lua_input.ToString() == "1") - { - GlobalWinF.MainForm.SetReadOnly(true); - } - else - { - GlobalWinF.MainForm.SetReadOnly(false); - } + Global.ReadOnly = (lua_input.ToString().ToUpper() == "TRUE" + || lua_input.ToString() == "1"); } public static void movie_setrerecordcounting(object lua_input) diff --git a/BizHawk.MultiClient/BizHawk.MultiClient.csproj b/BizHawk.MultiClient/BizHawk.MultiClient.csproj index 851e3a5d70..f01e425f2a 100644 --- a/BizHawk.MultiClient/BizHawk.MultiClient.csproj +++ b/BizHawk.MultiClient/BizHawk.MultiClient.csproj @@ -450,7 +450,6 @@ <Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Gui.cs" /> <Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Input.cs" /> <Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Joypad.cs" /> - <Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Movie.cs" /> <Compile Include="tools\Lua\Libraries\EmuLuaLibrary.NES.cs" /> <Compile Include="tools\Lua\Libraries\EmuLuaLibrary.Savestate.cs" /> <Compile Include="tools\Lua\Libraries\EmuLuaLibrary.SNES.cs" /> diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 23cf5b8b90..9e7be9836a 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -3471,19 +3471,6 @@ namespace BizHawk.MultiClient } - public void SetReadOnly(bool read_only) - { - Global.ReadOnly = read_only; - if (Global.ReadOnly) - { - GlobalWinF.OSD.AddMessage("Movie read-only mode"); - } - else - { - GlobalWinF.OSD.AddMessage("Movie read+write mode"); - } - } - public void LoadTAStudio() { if (!TAStudio1.IsHandleCreated || TAStudio1.IsDisposed) diff --git a/BizHawk.MultiClient/tools/TAStudio.cs b/BizHawk.MultiClient/tools/TAStudio.cs index 82ff771225..4025279a56 100644 --- a/BizHawk.MultiClient/tools/TAStudio.cs +++ b/BizHawk.MultiClient/tools/TAStudio.cs @@ -82,21 +82,6 @@ namespace BizHawk.MultiClient } } - //public string GetMnemonic() - //{ - // StringBuilder str = new StringBuilder("|"); //TODO: Control Command virtual pad - - // //TODO: remove this hack with a nes controls pad - // if (Global.Emulator.SystemId == "NES") - // { - // str.Append("0|"); - // } - - // for (int x = 0; x < Pads.Count; x++) - // str.Append(Pads[x].GetMnemonic()); - // return str.ToString(); - //} - private void TASView_QueryItemBkColor(int index, int column, ref Color color) { if (index == 0 && Global.MovieSession.Movie.StateFirstIndex == 0) @@ -288,7 +273,7 @@ namespace BizHawk.MultiClient { if (ReadOnlyCheckBox.Checked) { - GlobalWinF.MainForm.SetReadOnly(true); + Global.ReadOnly = true; ReadOnlyCheckBox.BackColor = SystemColors.Control; if (Global.MovieSession.Movie.IsActive) @@ -299,7 +284,7 @@ namespace BizHawk.MultiClient } else { - GlobalWinF.MainForm.SetReadOnly(false); + Global.ReadOnly = false; ReadOnlyCheckBox.BackColor = Color.LightCoral; if (Global.MovieSession.Movie.IsActive) {