diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs index 4a73799b61..cd648ad6c1 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs @@ -444,12 +444,16 @@ namespace BizHawk.Client.EmuHawk } [LuaMethodExample("local sttasget = tastudio.getmarker( 500 );")] - [LuaMethod("getmarker", "returns the marker text at the given frame, or an empty string if there is no marker for the given frame")] - public string GetMarker(int frame) + [LuaMethod( + name: "getmarker", + description: "Returns the label of the marker on the given frame." + + " If that frame doesn't have a marker (or TAStudio isn't running), returns an empty string." + + " If branchIndex is specified, searches the markers in that branch instead.")] + public string GetMarker(int frame, int? branchIndex = null) { if (Engaged()) { - var marker = Tastudio.CurrentTasMovie.Markers.Get(frame); + var marker = MarkerListForBranch(branchIndex).Get(frame); if (marker != null) { return marker.Message;