Commit Graph

4896 Commits

Author SHA1 Message Date
zeromus c878c85dae for your consideration: sync settings return flags instead of a bool, so we can have more granularity in what needs resetting than just "reboot core". for instance, we would like to minimize the number of times the window layout is redone by not doing it when the screen settings havent changed. HOWEVER, while I was writing this commit message, I realized, I should probably do it just by being more cautious in kicking off the layout (unless the data coming from the core has changed, a layout shouldnt happen). So I am going to make this commit, in case it inspires anyone, and then revert it. 2020-04-23 21:05:56 -04:00
zeromus c5ff7edba9 fiddle with race condition thing some more. uhhh full disclosure, I still got a crash once. Couldnt repro it (as compared to before where it was 100% fully reproducible for me. not sure why though 2020-04-23 20:40:16 -04:00
zeromus 3403ecacb7 fix race condition between OTK_Gamepad initialize and EnumerateDevices() from input thread 2020-04-23 20:35:04 -04:00
adelikat 72c4e19183 MovieSession - hold on to a copy of the IEmulator instance, and use it instead of Global.Emulator 2020-04-20 09:20:00 -05:00
alyosha-tas ada61fae93 Switch cores correctly, fixses #1939 2020-04-20 08:59:19 -04:00
adelikat 91dd8c938e MovieSession.QueueNewMovie - reduce dependencies 2020-04-19 14:18:09 -05:00
adelikat 70633419ac
Refactor TasMovie and add interface (#1940)
* create ITasMovie interface, still lots of todos

* interface for TasMovie.ChangeLog

* rename method

* interface more TasMovie things

* file rename

* interface more ITasMovie things

* make Bk2Movie and TasMovie internal, rely on interfaces for behavior and MovieService for instantiation

* MovieService cleanup

* cleanup TasBranch handling and simplify ITasMovie api

* more branch logic cleanup and ITasMovie simplificaiton

* more cleanup of branch handling

* more ITasMovie simplification

* nitpick cleanup

* Use IMovie.GetInputLogEntry instead of GetLogEntries

* more ITasMovie cleanup

* move come ITasMovie properties to TasBranchCollection

* TasMovie cleanup

* simplify ITasMovie more

* cleanup
2020-04-19 13:38:45 -05:00
adelikat 918fbe6367 fix Tastudio .tasproj loading broken in previous commits (this code is a mess), MovieSession - remove setter on Movie property 2020-04-18 15:37:43 -05:00
adelikat 56cc1fefff Tastudio - simplify movie loading stuff 2020-04-18 15:28:31 -05:00
adelikat 4e3aa0eb15 move Bk2 -> TasMovie conversion logic from Tastudio to MovieSession, fix crashing when loading .bk2 movies from the tastudio menu 2020-04-18 14:50:25 -05:00
adelikat d946aa6145 tastudio - cleanups 2020-04-18 14:50:25 -05:00
adelikat 7a77861896 Conisstently use MovieSession.StopMovie instead of stopping the movie directly, derefrence the movie on stopping instead of letting it hang around in memory 2020-04-18 14:50:25 -05:00
adelikat b2208d714c Tastudio cleanups 2020-04-18 14:50:25 -05:00
adelikat 1611ff3aef IMovieSession - rename a property, add documentation 2020-04-18 14:50:25 -05:00
adelikat 6d699012a6 disable record movie dialog if core needs rebooting, fixes bug of recording the wrong sync settings into the movie and causing a crash 2020-04-18 13:00:26 -05:00
adelikat fa552cab81 restrict access to IMovieSession.QueuedMovie 2020-04-18 12:05:16 -05:00
adelikat dc9fa1acf3 movie code cleanup 2020-04-18 11:54:49 -05:00
adelikat 189a47ad3c move more movie loading logic out of Mainform and into MovieSession and also some extension methods 2020-04-18 11:25:37 -05:00
adelikat 3ec6662dc9 move core preference setting shenangians from MainForm.StartNewMovie() to MovieSession 2020-04-18 10:55:41 -05:00
adelikat 2a9710b63c movie some video provider movie logic into an extension method 2020-04-18 10:49:15 -05:00
adelikat 892185d2fd remove useless virtualpad restart in StartNewMovie, tools are already restarted by design 2020-04-18 10:36:42 -05:00
adelikat 9494243eef add an IStatable extension method that can load a state directly from a byte array, reduces the stream creation boiler plate in a number of palces 2020-04-18 10:26:08 -05:00
adelikat a460846ff8 Tastudio - account for an unlikely edge case NRE where right button held is true but mouse is outside of the control 2020-04-18 10:23:10 -05:00
adelikat 2a2ddde277 MainForm - disable recent movie menu item when tastudio is active 2020-04-18 10:17:14 -05:00
adelikat d50bf21da9 move some logic from mainform to moviesession, remove TasMovie check that makes no sense 2020-04-18 10:09:47 -05:00
adelikat 3940187800 Nes - Core menu - add subneshawk 2020-04-18 10:03:11 -05:00
adelikat 19095bb7e5 simplify 2020-04-18 09:55:57 -05:00
adelikat dfe7f8e3ab refactor core preferences to be a dictionary<string, string> to be stored in config, and consolidate subnes and subgb into just another core selection 2020-04-18 09:55:57 -05:00
adelikat f090d75c9d use Emulator.IsNull 2020-04-16 12:25:42 -05:00
adelikat eb3ddab060 Cleanup IMovieSession method names to be a bit more conscise 2020-04-16 12:25:42 -05:00
adelikat 3f1ef8dd4d add a IMovieSession property to ToolFormBase and use it 2020-04-16 12:25:42 -05:00
YoshiRulz fa1c494ad8
Encapsulate input method, revive DirectInput, cleanup Input.Instance 2020-04-17 03:20:18 +10:00
adelikat 0aa8d71a3f more MovieSession refactoring 2020-04-15 20:37:50 -05:00
adelikat 3953b1de5a use desired property for checking for a queued movie 2020-04-15 16:09:34 -05:00
adelikat c0fde42a0c don't expose Bk2Controller, clients need to depend on an interface and rely on the Movie (well, MovieSession currently) to generate an IMovieController instance, since different implementations of IMovie need to be able to create their own controller implementations 2020-04-14 21:35:44 -05:00
adelikat f2e52988c1 simplify some IMovieSession stuff 2020-04-14 21:23:47 -05:00
adelikat ab7225c955 remove MovieSession convenience property that isn't that convenient anyway 2020-04-14 20:58:02 -05:00
adelikat 0d2f014621 refactor Bk2LogEntryGenerator to be stateless, refactor some IMovieSession shenangians 2020-04-14 20:50:21 -05:00
adelikat cdfeda8b71 rename IMovieController methods and classes to better describe what they are 2020-04-14 20:10:50 -05:00
adelikat aa80c3a0d6 majorly refactor Bk2Controller more 2020-04-14 19:33:49 -05:00
adelikat 13e58cbac5 refactor IMovieController 2020-04-14 19:05:17 -05:00
adelikat cc15bb2841 fix some object churning when input display is on 2020-04-14 17:47:49 -05:00
adelikat 03a7ea8438 IMovie.PopulateWithDefaultHeaderValues() - pass in dependencies instead of using Globals 2020-04-14 17:30:32 -05:00
adelikat 2b17c6d310 simplify some LogGenerator code 2020-04-14 16:44:37 -05:00
adelikat 831621b864 remove some unused code 2020-04-14 16:25:28 -05:00
YoshiRulz d2e19c9ba5
Slightly grow a GroupBox to avoid its contents overflowing (fix #1931) 2020-04-14 18:15:07 +10:00
zeromus 3b86bd741f REVERT DisplayConfig pre-layoutpanel (see if this helps #1930) 2020-04-13 20:53:35 -04:00
adelikat 8c852c1b70 refactor importers to pass in a config instance, instead of using Global.Config 2020-04-13 19:51:42 -05:00
adelikat ade678487a Lua console - account for separators when doing Duplicate Script 2020-04-13 19:29:25 -05:00
YoshiRulz 7cce81a880
Move LuaLibraries.GuiLibrary to inheritors, fix related NREs on Unix 2020-04-14 05:11:20 +10:00