feos
7b7cea8bcf
update gargoyles script to work with new lua
2022-12-09 12:27:48 +03:00
CasualPokePlayer
64d693e63f
call retro_unload_game before retro_deinit (libretro api specifies retro_unload_game be called before retro_deinit, in practice cores don't really care but best fix this)
2022-12-08 23:18:37 -08:00
CasualPokePlayer
29443dae49
fix #3484
2022-12-08 14:26:23 -08:00
YoshiRulz
c4f4c793da
Remove unused `IPlatformLuaLibEnv` implementation
2022-12-09 05:41:49 +10:00
YoshiRulz
5197c36a5d
Remove `[Lua*StringParam]` as they're no longer relevant
...
fixes 45fbdb484
2022-12-09 05:40:31 +10:00
YoshiRulz
5c0143d6f6
Minor corrections to newly-added Lua documentation
...
fixes 1452f831a
, 82c3b471a
, b687dea1b
, 49cd836e1
2022-12-09 05:28:36 +10:00
CasualPokePlayer
49cd836e18
log warning when using the deprecated lua bit functions
2022-12-08 04:26:54 -08:00
CasualPokePlayer
56d66ca555
add reset support to libretro, resolves #3482
2022-12-07 19:54:59 -08:00
CasualPokePlayer
1fc08e3d95
Use NLua's MethodCache if possible for MethodBase based lua functions (see 0ed3085ec3
)
2022-12-07 19:36:13 -08:00
YoshiRulz
4caa99afe3
Remove Lua in Mono warning as it's no longer relevant
...
fixes 45fbdb484
2022-12-07 18:46:25 +10:00
kalimag
01ab9416b5
Make script paths in .luases relative to .luases path
...
Restore behavior before 99dc0e03df
2022-12-07 18:24:21 +10:00
YoshiRulz
df4df517b8
Add `IMovieApi.PlayFromStart`/`movie.play_from_start` ( resolves #384 )
2022-12-07 18:16:13 +10:00
YoshiRulz
7fdc3f992d
Propagate success through to caller for movie load/restart
2022-12-07 18:16:13 +10:00
YoshiRulz
0076c8802b
Add `saveChanges` parameter to `IMovieApi.Stop`/`movie.stop`
2022-12-07 18:16:13 +10:00
YoshiRulz
e0a7a39b0d
Have `IMovieApi.Stop` implementation use `MainForm.StopMovie`
2022-12-07 18:16:13 +10:00
kalimag
596e8d9198
Call `onexit` and cleanup when removing lua script
2022-12-07 18:15:31 +10:00
kalimag
50fc7e28da
Make "Stop all scripts" behave the same as toggling them off
2022-12-07 18:15:31 +10:00
kalimag
817b258a79
Remove relative path manipulation in `LuaConsole`
2022-12-07 18:15:31 +10:00
kalimag
f625771cd0
Don't create FileSystemWatcher for missing directories
2022-12-07 18:15:31 +10:00
kalimag
cf2b83b102
Disable lua script if loading fails
2022-12-07 18:15:31 +10:00
kalimag
bd53807b0f
Store `LuaFile` `FileSystemWatcher` in dictionary
...
Avoid path string comparisons, `FileSystemWatcher` events may format relative paths differently
2022-12-07 18:15:31 +10:00
kalimag
6aa7c48402
Update Lua registered functions window after restart
...
Make registered functions window show functions for new LuaImp after core restart/reopening the Lua console
2022-12-07 18:15:31 +10:00
kalimag
ee66faba0b
Clean up old LuaImp before creating new one
...
Prevents memory/resource leak
Causes open forms to be closed on core restart
2022-12-07 18:15:31 +10:00
kalimag
3a70fb65f8
Refactor disabling Lua script into separate method
2022-12-07 18:15:31 +10:00
kalimag
7c7ac64ae6
Stop discarding Lua session save directory
...
Previously any path would into ".\foo.luases" and be saved in exe dir
2022-12-07 18:15:31 +10:00
kalimag
9ee788195a
Improve Lua `FileSystemWatcher` thread safety
...
Make FSW invoke the entire event handler on main thread.
Avoids theoretical race condition and thread safety issues with the linq query.
2022-12-07 18:15:31 +10:00
kalimag
733a8bee88
Dispose FileSystemWatchers in LuaConsole
2022-12-07 18:15:31 +10:00
kalimag
28d6415190
Remove running scripts before loading session
...
Clean up scripts instead of just clearing script list
2022-12-07 18:15:31 +10:00
kalimag
cc10de4033
Refactor removing Lua scripts into separate method
2022-12-07 18:15:31 +10:00
kalimag
564a1e4a67
Remove obsolete `LuaConsole.RunLuaScripts`
...
Method is mostly a duplicate of `EnableLuaFile`, only called when loading a session or an already loaded script.
In either case it didn't actually start the scripts due to an inverted condition, and would stop running scripts without doing the required cleanup.
2022-12-07 18:15:31 +10:00
kalimag
5d143ca879
Properly start scripts after loading Lua session
...
Previously, scripts would display as enabled but not actually run until toggled off and on.
2022-12-07 18:15:31 +10:00
kalimag
0effd435f6
Fix issues when opening same Lua script multiple times
2022-12-07 18:15:31 +10:00
kalimag
14e713837b
Change remaining `Config.DisableLuaScriptsOnLoad` refs to Settings
...
Resolve inconsistent use of duplicate property on `Config` and `LuaConsoleSettings`, finishes partial refactoring from 324a50a
This will effectively reset this setting to default in existing configs.
2022-12-07 18:15:31 +10:00
YoshiRulz
a8e0192281
Use FLPs so UI scale doesn't break Record Movie dialog (see #2605 )
...
disables resizing the dialog; default is big enough and the `TextBox`es can
scroll
2022-12-07 15:43:25 +10:00
YoshiRulz
632f063073
Cleanup `RecordMovie` ctor
2022-12-07 15:43:24 +10:00
YoshiRulz
400b1b589b
Inline `RecordMovie.InitializeComponent` (Designer file)
2022-12-07 15:43:21 +10:00
YoshiRulz
102874e480
Fix N64 header detection being swapped ( fixes #3477 )
...
fixes abeaa2a10
how ironic
2022-12-07 14:34:52 +10:00
YoshiRulz
62f6f3b471
Fix Win32LuaLibraries init'ing incorrectly on `DeveloperBuild = false`
2022-12-07 14:27:19 +10:00
CasualPokePlayer
b04260bee7
fix unwrapped lua exceptions not being correctly thrown
2022-12-06 14:21:39 -08:00
YoshiRulz
def5df44fa
Fix double call to `UIHelper.ScaleX` in `ControllerConfig` (see #2605 )
...
fixes 93c47b87b
2022-12-07 05:29:27 +10:00
Morilli
5e6c4a2bbd
fix justifier controller never working oops
2022-12-06 19:42:30 +01:00
Morilli
96cc3f8745
BSNESv115: implement an extended gamepad controller with 4 extra buttons
...
this is a breaking change for existing movies, but only when a non-gamepad controller was used, which is rare
2022-12-06 19:21:08 +01:00
CasualPokePlayer
339994c5a7
change these to using var
2022-12-06 09:46:12 -08:00
CasualPokePlayer
b687dea1b0
change every IntPtr<->int cast to IntPtr<->long. we got 64 bit integers with lua now, and a pointer is 64 bits, so might avoid some dumb bug due to truncations and some ungodly amount of ram being used
...
TODO: see if we can skip this cast nonsense. the lua tests indicate IntPtr should pass through fine, being considered "userdata", probably better so the user can't just pass raw numbers for the handle.
2022-12-06 04:53:35 -08:00
CasualPokePlayer
bc79664461
fix implicit lua number to .net conversion
...
fix .net exceptions not halting the running script
fix inconsistency with stdout and lua console printing errors, both should end in a newline now
print the inner exception of a lua exception (i.e. the .net extension) if possible
2022-12-06 02:52:57 -08:00
CasualPokePlayer
eb00019c86
fix passing numbers for string args in .net lua functions (old engine had this behavior, granted "bad user" if they relied on this), add appropriate test
...
fix passing sbyte/char as args, add appropriate tests
cleanup the lua auto unlock hack, using a nice ref struct + dispose to handle it
2022-12-05 23:21:23 -08:00
CasualPokePlayer
920682688b
deprecate lua bit functions which have direct operator counterparts in new lua
2022-12-05 18:23:11 -08:00
CasualPokePlayer
dcd570bf87
fix mainmemory.write_bytes_as_dict
2022-12-05 16:46:22 -08:00
Morilli
4a49fc174b
Improve LsmvImport in numerous ways
...
- previously, every second frame was empty (lol), since 2016 i believe
- now imports as (sub)bsnes115 movie instead of bsnes, allowing to import subframe inputs and delayed resets
- imports controller types correct(er)ly
2022-12-05 16:28:22 +01:00
Morilli
10ba45d462
BSNESv115+: actually provide IBoardInfo properly
2022-12-04 22:48:29 +01:00