Change `tastudio.getmarker` to return `nil` (not empty string) on fail

This commit is contained in:
YoshiRulz 2025-05-28 01:42:02 +10:00
parent ff04b85199
commit 90f2b27a34
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 3 additions and 3 deletions

View File

@ -447,9 +447,9 @@ namespace BizHawk.Client.EmuHawk
[LuaMethod( [LuaMethod(
name: "getmarker", name: "getmarker",
description: "Returns the label of the marker on the given frame." 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 that frame doesn't have a marker (or TAStudio isn't running), returns nil."
+ " If branchIndex is specified, searches the markers in that branch instead.")] + " If branchIndex is specified, searches the markers in that branch instead.")]
public string GetMarker(int frame, int? branchIndex = null) public string/*?*/ GetMarker(int frame, int? branchIndex = null)
{ {
if (Engaged()) if (Engaged())
{ {
@ -460,7 +460,7 @@ namespace BizHawk.Client.EmuHawk
} }
} }
return ""; return null;
} }
/// <remarks>assumes a TAStudio project is loaded</remarks> /// <remarks>assumes a TAStudio project is loaded</remarks>