From 3a3494aedbf6866caa91c202c95335f7a8baa66c Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Thu, 18 Aug 2022 17:12:15 +1000 Subject: [PATCH] Add missing attribute to `events.can_use_callback_params` param --- src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs b/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs index bebcba44a51..8d4729c0db3 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelperLibs/EventsLuaLibrary.cs @@ -46,7 +46,7 @@ private void LogScopeNotAvailable(string scope) [LuaMethod("can_use_callback_params", "Returns whether EmuHawk will pass arguments to callbacks. This version passes arguments to \"memory\" callbacks, so this function will return true for that input. (It returns false for any other input.) This tells you whether hacks for older versions w/o parameter support are necessary.")] [LuaMethodExample("local mem_callback = event.can_use_callback_params(\"memory\") and mem_callback or mem_callback_pre_29;")] - public bool CanUseCallbackParams(string subset = null) + public bool CanUseCallbackParams([LuaEnumStringParam] string subset = null) => subset is "memory"; [LuaMethodExample("local steveonf = event.onframeend(\r\n\tfunction()\r\n\t\tconsole.log( \"Calls the given lua function at the end of each frame, after all emulation and drawing has completed. Note: this is the default behavior of lua scripts\" );\r\n\tend\r\n\t, \"Frame name\" );")]