Skip to content

Commit

Permalink
Correct mem callbacks docs (resolves #3522)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz committed Mar 16, 2023
1 parent 565a0b9 commit 6b4f335
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public string OnLoadState(LuaFunction luaf, string name = null)
.Guid.ToString();

[LuaDeprecatedMethod]
[LuaMethod("onmemoryexecute", "Fires after the given address is executed by the core")]
[LuaMethod("onmemoryexecute", "Fires immediately before the given address is executed by the core")]
public string OnMemoryExecute(
LuaFunction luaf,
uint address,
Expand All @@ -109,8 +109,8 @@ public string OnMemoryExecute(
return OnBusExec(luaf, address, name: name, scope: scope);
}

[LuaMethodExample("local exec_cb_id = event.on_bus_exec(\r\n\tfunction()\r\n\t\tconsole.log( \"Fires after the given address is executed by the core\" );\r\n\tend\r\n\t, 0x200, \"Frame name\", \"System Bus\" );")]
[LuaMethod("on_bus_exec", "Fires after the given address is executed by the core")]
[LuaMethodExample("local exec_cb_id = event.on_bus_exec(\r\n\tfunction()\r\n\t\tconsole.log( \"Fires immediately before the given address is executed by the core\" );\r\n\tend\r\n\t, 0x200, \"Frame name\", \"System Bus\" );")]
[LuaMethod("on_bus_exec", "Fires immediately before the given address is executed by the core")]
public string OnBusExec(
LuaFunction luaf,
uint address,
Expand Down Expand Up @@ -145,7 +145,7 @@ public string OnBusExec(
}

[LuaDeprecatedMethod]
[LuaMethod("onmemoryexecuteany", "Fires after any address is executed by the core (CPU-intensive)")]
[LuaMethod("onmemoryexecuteany", "Fires immediately before any address is executed by the core (CPU-intensive)")]
public string OnMemoryExecuteAny(
LuaFunction luaf,
string name = null,
Expand All @@ -155,8 +155,8 @@ public string OnMemoryExecuteAny(
return OnBusExecAny(luaf, name: name, scope: scope);
}

[LuaMethodExample("local exec_cb_id = event.on_bus_exec_any(\r\n\tfunction()\r\n\t\tconsole.log( \"Fires after any address is executed by the core (CPU-intensive)\" );\r\n\tend\r\n\t, \"Frame name\", \"System Bus\" );")]
[LuaMethod("on_bus_exec_any", "Fires after any address is executed by the core (CPU-intensive)")]
[LuaMethodExample("local exec_cb_id = event.on_bus_exec_any(\r\n\tfunction()\r\n\t\tconsole.log( \"Fires immediately before every instruction executed (in the specified scope) by the core (CPU-intensive)\" );\r\n\tend\r\n\t, \"Frame name\", \"System Bus\" );")]
[LuaMethod("on_bus_exec_any", "Fires immediately before every instruction executed (in the specified scope) by the core (CPU-intensive)")]
public string OnBusExecAny(
LuaFunction luaf,
string name = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public interface IMemoryCallbackSystem : IEnumerable<IMemoryCallback>
/// Executes all matching callbacks for the given address and domain
/// </summary>
/// <param name="addr">The address to check for callbacks</param>
/// <param name="value">The value contained (or written to) addr</param>
/// <param name="value">For reads/execs, the value read/executed; for writes, the value to be written. Cores may pass the default <c>0</c> if write/exec is partially implemented.</param>
/// <param name="flags">The callback flags relevant to this access</param>
/// <param name="scope">The scope that the address pertains to. Must be a value in <see cref="AvailableScopes"/></param>
void CallMemoryCallbacks(uint addr, uint value, uint flags, string scope);
Expand Down

0 comments on commit 6b4f335

Please sign in to comment.