From 3592d1418d9d61e52dd95d732cc483f7263ace71 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 13 Oct 2015 18:54:05 -0500 Subject: [PATCH] lua - add client.SetSoundOn and client.GetSoundOn --- .../Lua/Libraries/EmuLuaLibrary.Client.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs index 753a70339b..9341433b27 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs @@ -161,6 +161,24 @@ namespace BizHawk.Client.EmuHawk GlobalWin.MainForm.FrameBufferResized(); } + [LuaMethodAttributes( + "SetSoundOn", + "Sets the state of the Sound On toggle" + )] + public static void SetSoundOn(bool enable) + { + Global.Config.SoundEnabled = enable; + } + + [LuaMethodAttributes( + "GetSoundOn", + "Gets the state of the Sound On toggle" + )] + public static bool GetSoundOn() + { + return Global.Config.SoundEnabled; + } + [LuaMethodAttributes( "SetClientExtraPadding", "Sets the extra padding added to the 'native' surface so that you can draw HUD elements in predictable placements"