adelikat
1519110691
Always refresh the APIHawk library instances instead of checking for null, fixes #1791
2020-01-18 13:22:19 -06:00
adelikat
7de9309be1
Lua - pass in MainForm to the EmuHawkLuaLibrary class
2019-12-31 16:46:05 -06:00
YoshiRulz
05801dc2c5
Reduce LINQ usage in Lua subsystem
2019-12-16 04:08:22 +10:00
YoshiRulz
104c17e77c
Prepare for EmuHawk-tied libraries to delegate to ApiHawk
...
Made ApiContainer inherit from APISubsetContainer, added
DelegatingLuaLibraryEmu, and reworked init logic in EmuLuaLibrary
2019-12-15 03:52:48 +10:00
adelikat
d757b8e64f
Refactor a lot of lua code to use a LuaFile object instead of a Lua object, and unify some luafile manipulation logic into methods
2019-11-29 15:02:40 -06:00
adelikat
24cbf5e274
lua - a bit more cleanup
2019-11-29 13:14:30 -06:00
adelikat
de2da910c2
Lua - simplify some logic
2019-11-29 12:47:50 -06:00
YoshiRulz
a7ffdd948e
Add DelegatingLuaLibrary and set up ApiHawk instantiation
2019-11-16 17:19:04 +10:00
YoshiRulz
ae12b0e23c
Revert some changes from #1237 and #1380 that aren't needed anymore
2019-11-04 19:53:14 +10:00
YoshiRulz
8c059aa43c
Replace helper methods with readonly bool IsUnixHost and cleanup
2019-11-04 14:30:05 +10:00
James Groom
90b0574bc3
Remove unnecessary calls to ToList (e.g. in foreach)
...
squashed PR #1591
2019-10-13 15:50:57 +00:00
James Groom
42764f0019
Add preliminary Unix compatibility (using Mono; resolves #1384 ) ( #1380 )
...
* Move PlatformSpecificLinkedLibs and implementations to common and rename
* Specify file ext. at LoadPlatformSpecific call site
* Move Client.Common.Global.RunningOnUnix to PlatformLinkedLibSingleton
* Inline var Resolver
* Use PlatformLinkedLibManager internally
* Move plugin load check to LinkedLibManager, use LinkedLibManager
* Interpolate
* Return exit code from dlclose/FreeLibrary
* Skip all calls to externs in BlipBufDll when using mono
* Use PlatformLinkedLibManager in SevenZipLibraryManager
* Add expected return value to workaround (from testing on Win32)
* Remove ".dll" from DllImport attr, remove temporary workaround, see desc.
The library can be built by changing the output file name in
`.../blip_buf/Makefile` to `libblip_buf.so`, and running `make`. It will be
loaded if placed in the `.../output` folder.
* Remove unused code, add TODO (this class is req. for Waterbox.PeWrapper)
The TODO is to [rewrite with
C#](https://docs.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files )
instead of importing from `kernel32.dll`.
* Update OpenTK again but better (for #1384 )
* Add Mono run script
* Add libblip_buf.so (temporary)
Temporary because it should be a separate package which BizHawk depends on.
* Add distro detection, add "already running" and "unknown distro" messages
* Gray-out Lua Console on Unix
* Extract superclass from EmuLuaLibrary, add shell implementation for Unix
* Specify libdl version, Fedora doesn't have the versionless symlink
* Remove empty `ToolStripMenuItem`, null `Text` caused crash on Unix
* Transform OpenTK keyboard input into a `List<KeyEvent>` and read that
Also fixes crash on rebind
* Remove debug `using ...;`
2019-01-04 01:50:55 +03:00
zeromus
d5770fb8a3
re-apply "keepalive" GC fixes to luainterface mode in emuhawk; maybe it will actually work now and not result in crashes. at least we should check it.
2017-07-22 23:41:30 -05:00
zeromus
afda5dbb62
set a value in the switchable lua library to indicate whether it's NLua or LuaInterface; effectively undo 8bc067cbbe
for LuaInterface
2017-07-15 16:36:18 -05:00
adelikat
9581ce6a93
rename LuaMethodAttributes to LuaMethodAttribute so as not to be a bad person
2017-07-10 14:02:08 -05:00
zeromus
0f686a0de1
* revert strict string checking behaviour from nlua Revision 10f4d0ce78a2a3cb9b727ac55c8705385f0ded7e (we dont want it, probably)
...
* do a better job porting old commits from bizhawk (should fix memory leaks, optional arguments)
2017-07-10 12:59:06 -05:00
zeromus
3417453b43
use NLua+KopiLua instead of LuaInterface
2017-07-09 23:51:02 -05:00
adelikat
f81f745fcc
Some luaconsole refactoring and moving more logic into LuaImp
2017-05-24 15:59:05 -05:00
adelikat
facd845453
Lua Console - Move StartLuaDrawing() and EndLuaDrawing() to LuaImp since they exclusively LuaImp logic
2017-05-23 12:40:40 -05:00
adelikat
6196d81b5d
Move _luaList from LuaConsole to LuaImp
2017-05-22 16:47:27 -05:00
adelikat
31e68a38f9
Cleanup EmuHawk lua library code
2017-05-19 09:47:18 -05:00
zeromus
8bc067cbbe
lua: fix memory leak causing crash after a few dozen script loads/resets
2017-05-10 01:58:19 -05:00
adelikat
e839a1c163
Add lua canvas methods to documentation
2017-05-07 16:33:48 -05:00
adelikat
5d4c8020c2
Delete more stuff
2017-02-22 10:12:14 -06:00
adelikat
f35717aae2
Remove yet more unused code
2017-02-22 10:11:08 -06:00
adelikat
7653b86f44
Remove some unused code
2017-02-22 10:09:44 -06:00
adelikat
3bfce81eae
LuaConsole - have a RequiredService of IEmulator and pass it into the lua implementation instead of using Global.Emulator
2016-12-06 10:35:11 -06:00
adelikat
e281950902
Close a lua instance before creating a new one, fixes #455
2016-10-06 15:17:05 -05:00
adelikat
11b4f5a5b1
Lua - fix #691 - When calling client.reboot_core we still want to re-inject dependencies to the lua libraries
2016-08-28 12:07:26 -04:00
zeromus
1a1a688b96
remove NeedsToPaint; client now repaints ~100fps while paused all the time. as it already did when input display was enabled. fixes #615.. probably
2016-04-20 12:17:41 -05:00
zeromus
5e89e563d0
overhaul lua sandboxing so that each lua script has its own sandbox. elaborate tracking of winform/event ownership to ensure that lua doesnt receive calls without going through the owner's sandbox. add win32-specific speed hacks for currdir set/get at higher speed. There may be bugs in this commit, but I think we're on the right track now.
2016-01-31 19:54:55 -06:00
zeromus
260ad45a88
fix lua's reboot_core function... maybe
2015-12-19 21:14:13 -06:00
Isotarge
02c04d0088
Fix forms.destroyall() and call it when lua console closes
...
Fixes #454
2015-11-07 01:38:44 +10:30
zeromus
169f36ee85
code formatting
2015-10-15 18:32:59 -05:00
zeromus
e12c711a0e
try to manage lua memory leak prevention in a way thats safer from re-entrancy during finalization thread
2015-03-28 05:53:03 +00:00
christoph.boehmwalder
e11811e2f8
Lua - Added an input box to the script console for on-the-fly command input
...
Set ImageScaling to None for all buttons in the toolbar in order to fix scaling issues
2015-01-02 19:36:32 +00:00
adelikat
72893a10f3
EmuLuaLibrary - remove some commented code that should have been deleted
2015-01-01 19:19:51 +00:00
goyuken
cfaf59f887
lua: internal infrsatructure changes to nes library
2014-12-17 23:03:58 +00:00
goyuken
ecf8728de6
factor out serviceinjector to emulation.common
2014-12-17 18:17:16 +00:00
adelikat
5c92adcaaa
Wire up the Log callback into lua libraries, this got lost in the last refactor I did, and so errors were not getting reported
2014-11-08 14:54:00 +00:00
adelikat
538c4632af
Add a LuaLibraryAttributes attribute to lua libraries with a Released property, only register libraries that are released except in Developer Builds, set tastudio library Released flag to false
2014-09-20 01:00:50 +00:00
zeromus
0fe74f95e7
fix LuaConsole PWD-related bugs
2014-06-03 02:39:15 +00:00
adelikat
0649d1c77e
Lua - add some more documentation, add a method that generates tasvideos wiki markup of the documentation and outputs to a file (method not wired to anything, there to save me tons of time when releasing)
2014-06-03 02:19:13 +00:00
adelikat
d037c6ed60
Oops
2014-06-03 01:21:49 +00:00
adelikat
83ada011e8
Lua - Refactor how lua libraries are registered by searching assemblies and finding implementations and building a list of these
2014-06-01 22:02:59 +00:00
adelikat
0782c9820d
Lua - implement event.onexit() - fires when the calling script stops execution, supports multiple callbacks per script
2014-05-26 03:08:16 +00:00
adelikat
e88b7cc93e
one more tweak to make lua library constructors unified
2014-05-21 01:15:52 +00:00
adelikat
17568997bf
Lua - unify constructors and have all libraries receive a lua context and an output callback, simplify some convolved registration code
2014-05-21 00:17:35 +00:00
adelikat
4ee4088c4c
read/write byte range functions - range check, and log warnings if user attempts to access outside the domain range, rather than throw a vague lua exception and crash
2014-05-19 01:42:41 +00:00
adelikat
059952f0a4
Change memory.getmemorydomainlist() to return a lua table instead of a string
2014-05-19 01:06:44 +00:00