diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Forms.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Forms.cs index 6b88687cc0..e9be4da0e9 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Forms.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Forms.cs @@ -482,6 +482,10 @@ namespace BizHawk.Client.EmuHawk { if (form.Handle == ptr) { + if (form.GetType().GetProperty(property).PropertyType.IsEnum) + { + value = Enum.Parse(form.GetType().GetProperty(property).PropertyType, value.ToString(), true); + } form .GetType() .GetProperty(property) @@ -493,6 +497,10 @@ namespace BizHawk.Client.EmuHawk { if (control.Handle == ptr) { + if (control.GetType().GetProperty(property).PropertyType.IsEnum) + { + value = Enum.Parse(control.GetType().GetProperty(property).PropertyType, value.ToString(), true); + } control .GetType() .GetProperty(property)