Commit Graph

164 Commits

Author SHA1 Message Date
YoshiRulz c09f195148
Fix bug in `HawkSourceAnalyzer` 2024-07-12 23:27:29 +10:00
YoshiRulz 5fd840e145
Add Analyzer (currently disabled) for target-typed `new` with `throw` 2024-07-09 00:12:46 +10:00
YoshiRulz 2a5d4b903c
Add Analyzer to disallow `^= true` 2024-07-08 10:39:06 +10:00
YoshiRulz 2ffb897b11
Add analyzer (currently disabled) to enforce a newline policy for `=>` 2024-07-07 15:32:31 +10:00
YoshiRulz 479f151bbb
Fix code style warnings in satellite .NET projects 2024-07-07 12:54:11 +10:00
YoshiRulz 2534c9288e
Downgrade Roslyn to 4.8.0 (to continue supporting earliest .NET 8 SDK)
partially reverts 4d1e852d2
2024-07-02 06:49:11 +10:00
YoshiRulz 867b560a1d
Fix BHI3300 being raised twice for offending accessors 2024-07-02 05:59:31 +10:00
YoshiRulz 4d1e852d2d
Bump Roslyn and testing deps 2024-07-02 05:59:31 +10:00
YoshiRulz 3490b544b4
Have About dialog copy full Git commit hash to clipboard
and use full hash in GitHub web app URI
2024-06-20 04:01:58 +10:00
YoshiRulz b5ff65f2cb
Add Analyzer to enforce spaces in `[]` 2024-05-30 15:51:20 +10:00
YoshiRulz ea15126fe1
Minor refactors to first-party Analyzers and Source Generators 2024-05-30 09:22:18 +10:00
YoshiRulz b8c600783a
Apply `<GenerateDocumentationFile/>` to satellite .NET projects 2024-05-30 09:22:17 +10:00
YoshiRulz 431b4f67e8
Fix most remaining warnings in satellite .NET projects 2024-05-30 09:22:11 +10:00
Morilli 48479145af revert this change in Virtu to fix the build 2024-05-29 10:35:44 +02:00
Morilli 7a789fb853 Fix some external project analyzer warnings 2024-05-29 09:41:53 +02:00
CasualPokePlayer 06ceec6390 Fixup nyma flatbuffer comms, update flatbuffer 2024-04-27 02:52:14 -07:00
Morilli fd36a37f17 Fix BizHawk.Analyzer potentially throwing
Co-Authored-By: James Groom <13409956+YoshiRulz@users.noreply.github.com>
2024-04-20 17:01:59 +02:00
Morilli b10f8969ac Don't allocate extra buffers in lua [Push|To]String 2024-03-19 12:19:56 +01:00
CasualPokePlayer 33a512235a Fix NRE for lua cothreads
fixes ba24907d9c
2023-11-17 19:46:59 -08:00
CasualPokePlayer ba24907d9c Improve NLua lua library loading, using C# function pointers. It now no longer depends on BizHawk.BizInvoke/BizHawk.Common. It might be faster too
Add in liblua-* variant for Linux lua library names (resolves #3678)
Remove some more unused NLua code
Make LuaState internal, we don't need to see it (NLua.Lua API slightly changed to accommodate this, tests could be broken due to this?)
Make various other NLua classes internal, we don't need to see them
Check against lua library loading failing, provide a non-fatal message box if it has failed instead of crashing on some exception.
Remove UnixSearchPaths (unneeded with LD_LIBRARY_PATH being set) and unused IImportResolvers
2023-11-17 19:03:03 -08:00
CasualPokePlayer cef72bef4b try to fix crashes under Mono when calling a cached function with the wrong arguments 2023-11-16 09:08:20 -08:00
CasualPokePlayer 582446651f fix all the analyser warnings in NLua 2023-11-16 03:14:47 -08:00
CasualPokePlayer 00e0a5fb2a fix default value arrays source generation
this change doesn't actually do anything since we don't even have arrays in default values
2023-10-25 22:55:46 -07:00
CasualPokePlayer f2a4794105 Use source generation for SettingsUtil.SetDefaultValues 2023-10-25 22:52:06 -07:00
Morilli 71e08e27b9 bump AnalysisModePerformance to Recommended
fixes CA1841

silence CA1805 and CA1822 because of sheer amount of violations

reduce severity of CA1838 because I don't wanna fix it lol
2023-08-14 14:18:45 -07:00
Morilli 8e557b0b9d bump AnalysisModeGlobalization to Recommended
fixes CA1304, CA1309, CA1310, CA1311

temporarily silences CA1305

reduce severity of CA2101
2023-08-14 14:18:45 -07:00
CasualPokePlayer bb96825c60
System.Data.SQLite -> Microsoft.Data.Sqlite (#3719)
* Swap System.Data.SQLite with Microsoft.Data.Sqlite

Apparently this is supposed to be a kind of successor? https://learn.microsoft.com/en-us/dotnet/standard/data/sqlite/compare

* Add e_sqlite3 libs to Assets, prevent runtimes folder creation with OS tailored libs plopped in, delete System.Data.SQLite references
2023-08-05 17:45:40 -07:00
CasualPokePlayer 78f5e75534
Kill Bizware .NET Framework deps (#3702)
The main objective in this PR is to get rid of the main .NET Framework dependencies in Bizware packages. This PR doesn't do that completely per se, still having .NET Framework used for WinForms Controls, but that can easily be swapped over for whatever UI framework we use next as long as it exposes native window handles in some way.

For this PR, it does some reorganizing of Bizware, splitting Bizware.OpenTK3 and Bizware.DirectX into 3 packages based on usage; Bizware.Audio, Bizware.Graphics, and Bizware.Input. These packages in the future probably could have more functionality moved into them, but for now they are largely just a reshuffling of the Bizware.OpenTK3 and Bizware.DirectX packages.

As both SlimDX and OpenTK3 are .NET Framework, they have been removed in this PR. Their replacements are as follows:

SharpDX: DirectSound, Direct3D9
Vortice: XAudio2, DirectInput/XInput
Silk.NET: OpenAL, OpenGL
SDL2-CS / native SDL2: OpenGL context management, new gamepad backend (replacing OpenTK's role for gamepads)
native X11: New key input backend (replacing one of OpenTK's roles for keyboards)

GLControl has been replaced by custom made control which just uses SDL2 for context management.

The OpenTK input backend has been replaced with a combination of SDL2 and an OS tailored key input backend (DirectInput on Windows, X11 on Linux, and planned to be Quartz on macOS). This is just represented on the user side as "SDL2" without mentioning the key input backend. This does mean for a while DirectX will be mandatory on Windows again, until a RAWINPUT backend is written for handling key input on Windows for the SDL2 input backend.
2023-07-23 00:35:43 -07:00
YoshiRulz 4a752f66b7
Add Analyzer to require checking or discarding `TryGetValue`
I'm pretty sure all the existing instances were intended to use `default(T)` if
the key isn't present, except maybe the cheatcode converters but I don't care to
rewrite those at the moment
2023-05-05 06:27:15 +10:00
YoshiRulz 8a5921182e
Add Analyzer to disallow discarding locals e.g. `_ = result;`
fixes 70bd081a9, a2185d9ef
2023-04-29 01:52:43 +10:00
YoshiRulz ebd36f08b6
Downgrade `System.Drawing.Common` to 6.0.0 and enable Unix impl.
fixes 65ffa3fc2
testroms run now, CBB checking GambatteSuite runs but I'm guessing it does too
2023-04-16 10:49:18 +10:00
YoshiRulz a1fe557d31
Re-enable MA0020 and fix noncompliance 2023-04-16 09:02:40 +10:00
YoshiRulz 65ffa3fc2e
Blindly update NuGet deps
temporarily disabled MA0020
2023-04-16 09:02:40 +10:00
YoshiRulz da65ad6226
Fix CS0168 warning 2023-04-16 09:02:36 +10:00
Moritz Bender ddc3e929e9
Use source generation for VersionInfo (#3625)
* Use source generator for VersionInfo

* Remove leftover hacks

* Use same fallbacks as NixHawk when Git not available

---------

Co-authored-by: YoshiRulz <OSSYoshiRulz@gmail.com>
2023-04-12 21:14:44 +02:00
CasualPokePlayer 03aa420bd5 fix last issue in #2951 properly 2023-04-09 23:43:28 -07:00
CasualPokePlayer 8737203f3a Add ISaveRam implementation for AppleII, fix bug which caused DiskIIController to not be correctly stated 2023-04-04 23:46:26 -07:00
CasualPokePlayer ece5d2548a Fix peeks/pokes with the new memory domains in Virtu
fixes a311b3b6f3
2023-04-02 23:37:48 -07:00
CasualPokePlayer 5ca888a8af misc cleanups with previous commit 2023-04-01 19:57:47 -07:00
CasualPokePlayer a311b3b6f3 Change up AppleII's "main ram" domain, add aux ram domain
The main ram previously seemed to just be a slice of the system bus between 0 - 0xbfff. this posed two problems: that area is banked, and that area could represent main ram or aux ram. main ram now represents all of the ram main ram can possible represent, ordered like how the core orders it (which the way it does it happens to be very natural in any case), and a new aux ram domain does the same thing but with aux ram
Also some other changes put in so Rider wouldn't error on building Virtu
2023-04-01 19:54:26 -07:00
CasualPokePlayer b11bb4fc22 fix check for IsParamsArray
fixes #3513
2023-01-10 05:53:58 -08:00
CasualPokePlayer 2c75e9bf96 remove this unneeded using of System.Drawing (i don't know how that got here) 2022-12-20 23:32:12 -08:00
CasualPokePlayer 91ce98ef12 better handle lua on linux, be compatible with lua 5.3 (we don't actually use any API exclusive to 5.4 so no real change in this case) 2022-12-20 23:30:33 -08:00
CasualPokePlayer 339915c013 check-in NLua to main repo
combine NLua with KeraLua (KeraLua is "gone" now I guess)
make it use the BizInvoker (so now it can properly handle the liblua5.4.so and lua54.dll names differing), also delete the liblua54.so.
minor speedup when creating a new empty table
make lua default to UTF8 internally, so we don't need to manually change the state's encoding
2022-12-17 21:51:10 -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
CasualPokePlayer b04260bee7 fix unwrapped lua exceptions not being correctly thrown 2022-12-06 14:21:39 -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 51f01efdc4 Properly handle errors when running a lua script, using Resume/Yield methods added to the LuaThread class (see f904fa0d53) 2022-12-02 14:44:05 -08:00
CasualPokePlayer 45fbdb4844
Move to NLua/KeraLua/Lua5.4 (#3361) 2022-12-01 00:51:02 -08:00