From 51a9d6f1510e68727351fd90117ce81c78ffcad0 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sat, 4 Dec 2021 07:19:06 +1000 Subject: [PATCH 1/6] Multi-target .NET Framework and .NET 8 --- Common.props | 3 +-- src/BizHawk.BizInvoke/BizHawk.BizInvoke.csproj | 2 +- src/BizHawk.Bizware.Audio/BizHawk.Bizware.Audio.csproj | 2 +- .../BizHawk.Bizware.BizwareGL.csproj | 2 +- .../BizHawk.Bizware.Graphics.Controls.csproj | 4 ++-- .../BizHawk.Bizware.Graphics.csproj | 2 +- src/BizHawk.Bizware.Input/BizHawk.Bizware.Input.csproj | 2 +- src/BizHawk.Client.Common/BizHawk.Client.Common.csproj | 2 +- .../BizHawk.Client.DiscoHawk.csproj | 10 ++-------- .../BizHawk.Client.EmuHawk.csproj | 4 ++-- .../Extensions/ControlExtensions.cs | 2 ++ src/BizHawk.Client.EmuHawk/MainForm.cs | 4 ++++ src/BizHawk.Common/BizHawk.Common.csproj | 5 ++++- src/BizHawk.Common/Util.cs | 2 +- .../BizHawk.Emulation.Common.csproj | 2 +- .../BizHawk.Emulation.Cores.csproj | 2 +- .../BizHawk.Emulation.DiscSystem.csproj | 2 +- .../BizHawk.WinForms.Controls.csproj | 6 ++++-- src/MainSlnCommon.props | 2 -- src/MainSlnExecutable.props | 5 +++-- 20 files changed, 34 insertions(+), 31 deletions(-) mode change 100755 => 100644 src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj diff --git a/Common.props b/Common.props index 19bbdbbc65c..9a40ffae860 100644 --- a/Common.props +++ b/Common.props @@ -27,8 +27,7 @@ false - false - portable + none TRACE true $(MSBuildProjectDirectory)=${$(MSBuildProjectName)}/ diff --git a/src/BizHawk.BizInvoke/BizHawk.BizInvoke.csproj b/src/BizHawk.BizInvoke/BizHawk.BizInvoke.csproj index 27464b465d7..33c9f7ce762 100644 --- a/src/BizHawk.BizInvoke/BizHawk.BizInvoke.csproj +++ b/src/BizHawk.BizInvoke/BizHawk.BizInvoke.csproj @@ -1,6 +1,6 @@ - net48 + net48;net8.0 diff --git a/src/BizHawk.Bizware.Audio/BizHawk.Bizware.Audio.csproj b/src/BizHawk.Bizware.Audio/BizHawk.Bizware.Audio.csproj index a1c9b5e2577..b512cfea8c0 100644 --- a/src/BizHawk.Bizware.Audio/BizHawk.Bizware.Audio.csproj +++ b/src/BizHawk.Bizware.Audio/BizHawk.Bizware.Audio.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + netstandard2.0;net8.0 diff --git a/src/BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj b/src/BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj index 0b984476741..7db01118953 100644 --- a/src/BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj +++ b/src/BizHawk.Bizware.BizwareGL/BizHawk.Bizware.BizwareGL.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + netstandard2.0;net8.0 diff --git a/src/BizHawk.Bizware.Graphics.Controls/BizHawk.Bizware.Graphics.Controls.csproj b/src/BizHawk.Bizware.Graphics.Controls/BizHawk.Bizware.Graphics.Controls.csproj index afa42186c55..9c92330dd40 100644 --- a/src/BizHawk.Bizware.Graphics.Controls/BizHawk.Bizware.Graphics.Controls.csproj +++ b/src/BizHawk.Bizware.Graphics.Controls/BizHawk.Bizware.Graphics.Controls.csproj @@ -1,14 +1,14 @@  - net48 + net48;net8.0-windows true disable + true - diff --git a/src/BizHawk.Bizware.Graphics/BizHawk.Bizware.Graphics.csproj b/src/BizHawk.Bizware.Graphics/BizHawk.Bizware.Graphics.csproj index 805c9754c8e..26954254d5b 100644 --- a/src/BizHawk.Bizware.Graphics/BizHawk.Bizware.Graphics.csproj +++ b/src/BizHawk.Bizware.Graphics/BizHawk.Bizware.Graphics.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + netstandard2.0;net8.0 diff --git a/src/BizHawk.Bizware.Input/BizHawk.Bizware.Input.csproj b/src/BizHawk.Bizware.Input/BizHawk.Bizware.Input.csproj index a43e7e1abb7..c4a7e9d1b46 100644 --- a/src/BizHawk.Bizware.Input/BizHawk.Bizware.Input.csproj +++ b/src/BizHawk.Bizware.Input/BizHawk.Bizware.Input.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + netstandard2.0;net8.0 diff --git a/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj index 526ece94b26..55ee645a671 100644 --- a/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj +++ b/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + netstandard2.0;net8.0 diff --git a/src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj b/src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj old mode 100755 new mode 100644 index 60ba414b0a4..3246a268519 --- a/src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj +++ b/src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj @@ -1,27 +1,21 @@  - net48 + net48;net8.0-windows discohawk.ico disable + true - - - - - - - diff --git a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 664aa002e65..8e1f9789c9b 100755 --- a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -1,6 +1,6 @@  - net48 + net48;net8.0-windows @@ -9,10 +9,10 @@ app.manifest disable None + true - diff --git a/src/BizHawk.Client.EmuHawk/Extensions/ControlExtensions.cs b/src/BizHawk.Client.EmuHawk/Extensions/ControlExtensions.cs index 29069fd3ffb..6a4bdad3e2a 100644 --- a/src/BizHawk.Client.EmuHawk/Extensions/ControlExtensions.cs +++ b/src/BizHawk.Client.EmuHawk/Extensions/ControlExtensions.cs @@ -31,6 +31,7 @@ public static void PopulateFromEnum(this ComboBox box, T enumVal) box.SelectedItem = enumVal.GetDescription(); } +#if !NET6_0_OR_GREATER /// extension method to make easier to use public static void Invoke(this Control control, Action action) => control.Invoke(action); @@ -38,6 +39,7 @@ public static void Invoke(this Control control, Action action) /// extension method to make easier to use public static void BeginInvoke(this Control control, Action action) => control.BeginInvoke(action); +#endif public static ToolStripMenuItem ToColumnsMenu(this InputRoll inputRoll, Action changeCallback) { diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 87eae0f4a77..b4768be1166 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -4803,7 +4803,11 @@ private void StartSingleInstanceServer() } // Create pipe and start the async connection wait +#if NET6_0_OR_GREATER + _singleInstanceServer = NamedPipeServerStreamAcl.Create( +#else _singleInstanceServer = new NamedPipeServerStream( +#endif "pipe-{84125ACB-F570-4458-9748-321F887FE795}", PipeDirection.In, 1, diff --git a/src/BizHawk.Common/BizHawk.Common.csproj b/src/BizHawk.Common/BizHawk.Common.csproj index 24c41336981..2c4df656364 100644 --- a/src/BizHawk.Common/BizHawk.Common.csproj +++ b/src/BizHawk.Common/BizHawk.Common.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + netstandard2.0;net8.0 @@ -16,4 +16,7 @@ + + + diff --git a/src/BizHawk.Common/Util.cs b/src/BizHawk.Common/Util.cs index ce8f0629c73..94670ee7c51 100644 --- a/src/BizHawk.Common/Util.cs +++ b/src/BizHawk.Common/Util.cs @@ -5,7 +5,7 @@ using System.IO.Compression; using System.Linq; using System.Reflection; -#if NET6_0 +#if NET6_0_OR_GREATER using System.Runtime.CompilerServices; #endif using System.Threading; diff --git a/src/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj b/src/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj index 8790dd2cae6..78a6fce58dc 100644 --- a/src/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj +++ b/src/BizHawk.Emulation.Common/BizHawk.Emulation.Common.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + netstandard2.0;net8.0 diff --git a/src/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj b/src/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj index 3657b7a326e..a1ebc8ba753 100644 --- a/src/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj +++ b/src/BizHawk.Emulation.Cores/BizHawk.Emulation.Cores.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + netstandard2.0;net8.0 diff --git a/src/BizHawk.Emulation.DiscSystem/BizHawk.Emulation.DiscSystem.csproj b/src/BizHawk.Emulation.DiscSystem/BizHawk.Emulation.DiscSystem.csproj index 386fc884ba9..1852b7c515f 100644 --- a/src/BizHawk.Emulation.DiscSystem/BizHawk.Emulation.DiscSystem.csproj +++ b/src/BizHawk.Emulation.DiscSystem/BizHawk.Emulation.DiscSystem.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + netstandard2.0;net8.0 diff --git a/src/BizHawk.WinForms.Controls/BizHawk.WinForms.Controls.csproj b/src/BizHawk.WinForms.Controls/BizHawk.WinForms.Controls.csproj index db07bf00139..796d1e52ca4 100644 --- a/src/BizHawk.WinForms.Controls/BizHawk.WinForms.Controls.csproj +++ b/src/BizHawk.WinForms.Controls/BizHawk.WinForms.Controls.csproj @@ -1,10 +1,12 @@  - net48 + net48;net8.0-windows + + true + - diff --git a/src/MainSlnCommon.props b/src/MainSlnCommon.props index 98c37b94f49..336b77c4c4c 100644 --- a/src/MainSlnCommon.props +++ b/src/MainSlnCommon.props @@ -1,11 +1,9 @@ - false $(DefineConstants);AVI_SUPPORT $(MSBuildProjectDirectory)/bin/doc_comments.xml $(NoWarn);CS1573;CS1591;NU1702 - $(MSBuildProjectDirectory)/../../output/dll None diff --git a/src/MainSlnExecutable.props b/src/MainSlnExecutable.props index fad2ae8c1c4..b5bc66ec4ce 100644 --- a/src/MainSlnExecutable.props +++ b/src/MainSlnExecutable.props @@ -3,6 +3,7 @@ $(MSBuildProjectDirectory)/../../output $(MSBuildProjectName.Substring($([MSBuild]::Add($(MSBuildProjectName.LastIndexOf('.')), 1)))) + $(AssemblyName) Exe @@ -13,10 +14,10 @@ - + - + From 737f2c3418d5fe9034d67b714307fc02d8e0400a Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Mon, 5 Jun 2023 02:41:06 +0200 Subject: [PATCH 2/6] fix somee .net8 warnings --- Common.props | 2 +- Directory.Packages.props | 2 +- References/BizHawk.Analyzer.dll | Bin 30720 -> 30720 bytes References/BizHawk.SrcGen.ReflectionCache.dll | Bin 13312 -> 13824 bytes References/BizHawk.SrcGen.SettingsUtil.dll | Bin 12800 -> 13312 bytes src/BizHawk.BizInvoke/BizInvoker.cs | 4 ++-- src/BizHawk.BizInvoke/BizInvokerUtilities.cs | 2 +- .../CallingConventionAdapter.cs | 2 +- .../Api/Classes/CommApi.cs | 2 +- .../Api/ClientWebSocketWrapper.cs | 8 ++++---- .../Api/DisplaySurfaceID.cs | 2 +- .../Api/HttpCommunication.cs | 16 ++++++++-------- .../tools/Watch/WatchList/WatchList.cs | 2 +- .../AVOut/FFmpegDownloaderForm.cs | 1 - .../BizHawk.Client.EmuHawk.csproj | 2 +- src/BizHawk.Client.EmuHawk/UpdateChecker.cs | 9 +-------- .../controls/VirtualPadAnalogStick.cs | 8 ++++---- .../Extensions/CollectionExtensions.cs | 8 ++++++-- src/BizHawk.Common/FFmpegService.cs | 2 +- .../MemoryBlock/MemoryViewStream.cs | 4 ++-- .../ConstrainedFloatConverter.cs | 2 +- .../ConstrainedIntConverter.cs | 2 +- .../ConstrainedStringConverter.cs | 4 ++-- .../DescribableEnumConverter.cs | 4 ++-- src/BizHawk.Common/Serializer.cs | 2 +- src/BizHawk.Common/Util.cs | 10 +++++----- src/BizHawk.Common/checksums/MD5Checksum.cs | 2 +- src/BizHawk.Common/checksums/SHA1Checksum.cs | 2 +- .../checksums/SHA256Checksum.cs | 2 +- .../Database/FirmwareID.cs | 2 +- src/BizHawk.Emulation.Common/VSystemID.cs | 2 +- 31 files changed, 53 insertions(+), 57 deletions(-) diff --git a/Common.props b/Common.props index 9a40ffae860..bac5ab33583 100644 --- a/Common.props +++ b/Common.props @@ -13,7 +13,7 @@ prompt strict $(TargetFramework.StartsWith("net4")) - 10.0 + 12.0 true SA0001 enable diff --git a/Directory.Packages.props b/Directory.Packages.props index ebefb115881..a45b1e7ebc3 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -28,7 +28,7 @@ - + diff --git a/References/BizHawk.Analyzer.dll b/References/BizHawk.Analyzer.dll index 62e21f6ee46d175d0f5350b23c2cc2b075d14a43..fa830e28d01ee18914bd652af2d24673f353da52 100644 GIT binary patch delta 9207 zcma)C3wRXex&Ho{+1cHh-OcW7E}IZS?%CWRA%PHxm>5t2FGNs`Ah0B%QjkD`9yyV0 z($E4&yu`5-trsA)o}jiBDz!b}AqJ~f%Y&z&vTY1 z?|kof{r_)f{(ok)=Zxq%BktO+-JN~ozW$w=Vt)VNlE9~T5M4?5?IAj*_UD9s$B2C3 zZ@`dg=O|@%vnUcb*uB7G_MljjUUnzU_+5%Wgq5DB|sV~xE~ncX~7iCRR4 zqHa-%w2~~P%PWs3)YSGc^lE#u#O@L(3(C_9yQ2_3*XxP&&J=U}t7j0iule0{=FV<>B!0yosMUwq6Fle6uhU|}lmYwM; z6k)s3b@e6a&_B)|XTzEOGzg#T7|du_rDbgPXmn!sspx8*NU<~Z!(x{G3w?TM7Hp-K zMIo&n9W%DfvNPNTB4XFOn}Bz_b7Rt@9r+ByqG%0{(R_gHUIdnZI3pK8$!DYv!sq(3 z^J9{hu`#8AIA0S9?TR@rxWCI!>M zx-$S#1eR`@U?26&6zTS-p2AwGmFctOkz{_%h;*61<)7t8bxz!BFAOF}&;p~RL+PFf zZFeTXDUfCNd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B?ECJu;K#jnJG_>FQEH=Pyg_te>1v(~Qd)J|xpwJTbI3!k{~byp!bsrX}# zhL2n>EGhWX3rzqT3z`r#VQ7-^(JO`I6WxKp^LSAE|1c(<)))tYa~OA9hyG4}U4JF6 zk$<6A(THq7K_NF#7FV$Fn!pU`6w0DRU+1>Yo6ft6T*6`D*V zVtDu2i0?k-Vv1NLzA8Qwvy^2@oAQwIk`hwO)EVkxb(i`tYDk->?bY7bqPqznx+Vb& zNb8c%al^OSco4;dIIt*)TP0_%eZc;oRjp#Py}I#EvE4q^_)^l7zJO4Yf^{Mj?PZe7Ev&Am>{wHZ z&f-pcZ_`Av)_%7s2mjsT^QKS4rejxEFA<{4p0TDzJbrBZnq#h!s&375>oSWqPtg@s zAK};ZVAnGW{x^eeHQDtWvUAo#YSnbB>m-DS6Z9nOOA3er)i#&Zf5qOrVY1kM?BWKu z5EJbF`^F2hqb=nL`26FlC@U{3w;yY1u&vhb<7=keX1w|K^Cadilt&AHIHI|`@N1P8 zXOqV@grEE-aR|0Ut@it^nXyHSXDxnY@0_bie-6#sd!g{B;oo#bq-$Qs%;tw~Yj|*7 zS@nGl>$g0#x^3&|mR0wTUbK4s>W22!qwib2seMz!eN7E*O=HT+NB_NZS!>fOT6|me znDG-Rp1x@?JvvRl<=w1hZ=PQ@Gx_-i3%36S?F?@C0|rr6Pj<3U?d*+(cJ0O=+Fcu? zw!dwfFL2|WqkvuC_M&LDuearjxyMGdUlwXP>9%@*vHi&XF@!8h=yLwAOy2Zk!3RDP IJ>~BI1^1bD!vFvP diff --git a/References/BizHawk.SrcGen.ReflectionCache.dll b/References/BizHawk.SrcGen.ReflectionCache.dll index 6c08fb3ce8876bddbff998a1e7fd64a4dc11d67b..7bced33335e051304d225f638404f42ccb1ae7e0 100644 GIT binary patch delta 4056 zcmZ8k3vg7`8UD|?chBCvgw1A?ED%D-CLxbavSdR-vVag8C=XGAgjW@6Ou|EK)+R7M zFu94Tv}na1!_#kMtDs_yVk=j}?YH?cnw5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zHRB7MQ%cWpzfi5xl?**8HAlB6%2}z)^ilOEXOnJ}bYcC5R@j4uP6tzKy+iL|q{2p( zrNhMSPM2<`(yQw*L#3+3S|3WwD&(tfr zA9I+rgzJ6CSIq1X*hgH3$BC;&Zy_!~ z8#6566LdCaZ4}a$KuT5{w%~WZc4@3f^xgy-x0mji?`i48e$fZ`Hh9K2!1xLFfapVl z!{Ux0%34Px+lQi`5q*?-vh3I>I%$uhmk4D>rj+TOrHpMU<66qNMdF6VjnJ*IBjQHH zE#aAY$k)Il=q29*y7TP?;w}((gEC!gqrTQ|6TMCJ-k5~;iqtF8fP@Y(9Y;fV3(<69 zK->e;%!tH{NX&@Dj7ZFg#EeQaqoRz8VrkR7rAbHcrApJ?WH{44ee;_=|gZP z_eNHY+U@-_tMtnF*O8C4E?w{Nlhc%WdL^&-b&H(6nN+jjcq_9f4{XV{2YYkt^xzx$ zr~K&;KAZkGtOJPYwPu@~~2i2bYwtQ{F(?WYs)4RQ8Yxx(fE?)wR{N z-o53Uz3hrZa}te2wufJXx^9JOX9s_+i}c-Wd zpBj7SsaHO@-mBl8v8wt+n+YxH^iuQl3wG6PyXn@NRhz!QX=8L#&DKpF(TuY_B-(c=5&P7H*UqfSYCJt0n{jreU@YByRqsi{hs#zT~(}K)Psf77iz1PQ+adE ZG;geCTd+R /// public static int ComputeClassFirstFieldOffset() - => ComputeFieldOffset(typeof(CF).GetField("FirstField")); + => ComputeFieldOffset(typeof(CF).GetField("FirstField")!); /// /// Compute the byte offset of the first byte of string data (UTF16) relative to a pointer to the string. diff --git a/src/BizHawk.BizInvoke/CallingConventionAdapter.cs b/src/BizHawk.BizInvoke/CallingConventionAdapter.cs index 4303d6fcd20..12c68d06f2d 100644 --- a/src/BizHawk.BizInvoke/CallingConventionAdapter.cs +++ b/src/BizHawk.BizInvoke/CallingConventionAdapter.cs @@ -144,7 +144,7 @@ private class WaterboxAdapter : ICallingConventionAdapter { private class ReferenceEqualityComparer : IEqualityComparer { - public bool Equals(Delegate x, Delegate y) + public bool Equals(Delegate? x, Delegate? y) => x == y; public int GetHashCode(Delegate obj) diff --git a/src/BizHawk.Client.Common/Api/Classes/CommApi.cs b/src/BizHawk.Client.Common/Api/Classes/CommApi.cs index 9888dffc184..8040111b06a 100644 --- a/src/BizHawk.Client.Common/Api/Classes/CommApi.cs +++ b/src/BizHawk.Client.Common/Api/Classes/CommApi.cs @@ -20,6 +20,6 @@ public sealed class CommApi : ICommApi public string? HttpTest() => HTTP == null ? null : string.Join("\n", HttpTestGet(), HTTP.SendScreenshot(), "done testing"); - public string? HttpTestGet() => HTTP?.Get(HTTP.GetUrl)?.Result; + public string? HttpTestGet() => HttpCommunication.Get(HTTP?.GetUrl)?.Result; } } diff --git a/src/BizHawk.Client.Common/Api/ClientWebSocketWrapper.cs b/src/BizHawk.Client.Common/Api/ClientWebSocketWrapper.cs index 9f754573936..59271a390a6 100644 --- a/src/BizHawk.Client.Common/Api/ClientWebSocketWrapper.cs +++ b/src/BizHawk.Client.Common/Api/ClientWebSocketWrapper.cs @@ -32,12 +32,12 @@ public Task Close(WebSocketCloseStatus closeStatus, string statusDescription, Ca return task; } - /// calls + /// calls public Task Receive(ArraySegment buffer, CancellationToken? cancellationToken = null) => _w?.ReceiveAsync(buffer, cancellationToken ?? CancellationToken.None) ?? throw new ObjectDisposedException(nameof(_w)); - /// calls + /// calls public string Receive(int bufferCap, CancellationToken? cancellationToken = null) { if (_w == null) throw new ObjectDisposedException(nameof(_w)); @@ -46,12 +46,12 @@ public string Receive(int bufferCap, CancellationToken? cancellationToken = null return Encoding.UTF8.GetString(buffer, 0, result.Count); } - /// calls + /// calls public Task Send(ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken? cancellationToken = null) => _w?.SendAsync(buffer, messageType, endOfMessage, cancellationToken ?? CancellationToken.None) ?? throw new ObjectDisposedException(nameof(_w)); - /// calls + /// calls public Task Send(string message, bool endOfMessage, CancellationToken? cancellationToken = null) { if (_w == null) throw new ObjectDisposedException(nameof(_w)); diff --git a/src/BizHawk.Client.Common/Api/DisplaySurfaceID.cs b/src/BizHawk.Client.Common/Api/DisplaySurfaceID.cs index 4358fc3f5f0..39bb034ebf0 100644 --- a/src/BizHawk.Client.Common/Api/DisplaySurfaceID.cs +++ b/src/BizHawk.Client.Common/Api/DisplaySurfaceID.cs @@ -15,7 +15,7 @@ public enum DisplaySurfaceID : int public static class DisplaySurfaceIDParser { #pragma warning disable BHI1005 // switching on string, possibly from user input, ArgumentException is correct here - [return: NotNullIfNotNull("str")] + [return: NotNullIfNotNull(nameof(str))] public static DisplaySurfaceID? Parse(string? str) => str?.ToLowerInvariant() switch { null => null, // this makes it easy to cascade the "remembered" value diff --git a/src/BizHawk.Client.Common/Api/HttpCommunication.cs b/src/BizHawk.Client.Common/Api/HttpCommunication.cs index 1270b8d058c..dbc5e527b1c 100644 --- a/src/BizHawk.Client.Common/Api/HttpCommunication.cs +++ b/src/BizHawk.Client.Common/Api/HttpCommunication.cs @@ -7,7 +7,7 @@ namespace BizHawk.Client.Common { public sealed class HttpCommunication { - private readonly HttpClient _client = new HttpClient(); + public static readonly HttpClient Client = new HttpClient(); private readonly Func _takeScreenshotCallback; @@ -33,10 +33,10 @@ public string ExecPost(string url = null, string payload = "") => Post( new FormUrlEncodedContent(new Dictionary { ["payload"] = payload }) ).Result; - public async Task Get(string url) + public static async Task Get(string url) { - _client.DefaultRequestHeaders.ConnectionClose = false; - var response = await _client.GetAsync(url).ConfigureAwait(false); + Client.DefaultRequestHeaders.ConnectionClose = false; + var response = await Client.GetAsync(url).ConfigureAwait(false); if (response.IsSuccessStatusCode) { return await response.Content.ReadAsStringAsync(); @@ -44,13 +44,13 @@ public async Task Get(string url) return null; } - public async Task Post(string url, FormUrlEncodedContent content) + public static async Task Post(string url, FormUrlEncodedContent content) { - _client.DefaultRequestHeaders.ConnectionClose = true; + Client.DefaultRequestHeaders.ConnectionClose = true; HttpResponseMessage response; try { - response = await _client.PostAsync(url, content).ConfigureAwait(false); + response = await Client.PostAsync(url, content).ConfigureAwait(false); } catch (Exception e) { @@ -87,7 +87,7 @@ public void SetTimeout(int timeout) if (timeout != 0) { - _client.Timeout = new TimeSpan(0, 0, 0, timeout / 1000, timeout % 1000); + Client.Timeout = new TimeSpan(0, 0, 0, timeout / 1000, timeout % 1000); Timeout = timeout; } } diff --git a/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs b/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs index ee418b04619..8682c5d58df 100644 --- a/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs +++ b/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchList.cs @@ -149,7 +149,7 @@ public void Insert(int index, Watch watch) /// public void InsertRange(int index, IEnumerable collection) { -#if NET6_0 +#if NET6_0_OR_GREATER if (collection.TryGetNonEnumeratedCount(out var n) && n is 0) return; #else if (collection is ICollection hasCount && hasCount.Count is 0) return; diff --git a/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs b/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs index d11feae8c59..2744905937e 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs @@ -160,4 +160,3 @@ private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs } } } - diff --git a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 8e1f9789c9b..98387b9e5a3 100755 --- a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/BizHawk.Client.EmuHawk/UpdateChecker.cs b/src/BizHawk.Client.EmuHawk/UpdateChecker.cs index 045682a2c84..7f6c51fe526 100644 --- a/src/BizHawk.Client.EmuHawk/UpdateChecker.cs +++ b/src/BizHawk.Client.EmuHawk/UpdateChecker.cs @@ -1,6 +1,4 @@ using System; -using System.IO; -using System.Net; using System.Threading; using BizHawk.Client.Common; @@ -90,12 +88,7 @@ private static void CheckInternal() private static string DownloadURLAsString(string url) { - var request = (HttpWebRequest)WebRequest.Create(url); - request.UserAgent = "BizHawk"; - request.KeepAlive = false; - using var response = (HttpWebResponse)request.GetResponse(); - using var responseStream = new StreamReader(response.GetResponseStream()); - return responseStream.ReadToEnd(); + return HttpCommunication.Get(url).Result; } private static string ValidateVersionNumberString(string versionNumber) diff --git a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/controls/VirtualPadAnalogStick.cs b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/controls/VirtualPadAnalogStick.cs index 76baba50fb5..f00af1ef236 100644 --- a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/controls/VirtualPadAnalogStick.cs +++ b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/controls/VirtualPadAnalogStick.cs @@ -78,8 +78,8 @@ public VirtualPadAnalogStick( AnalogStick.ClearCallback = ClearCallback; manualR.Maximum = Math.Max(RectToPolarHelper(RangeX.Max, RangeY.Max).R, RectToPolarHelper(RangeX.Min, RangeY.Min).R); - void UnsetLastFocusedNUD(object sender, EventArgs eventArgs) - => setLastFocusedNUD(null, null); + void UnsetLastFocusedNUD(object? sender, EventArgs eventArgs) + => setLastFocusedNUD(null, EventArgs.Empty); ManualX.ValueChanged += ManualXY_ValueChanged; ManualX.GotFocus += setLastFocusedNUD; ManualX.LostFocus += UnsetLastFocusedNUD; @@ -191,7 +191,7 @@ public void Bump(int? x, int? y) public void SetPrevious(IController previous) => AnalogStick.SetPrevious(previous); - private void ManualXY_ValueChanged(object sender, EventArgs e) + private void ManualXY_ValueChanged(object? sender, EventArgs e) { if (_updatingFromAnalog || _updatingFromPolar) return; _updatingFromXY = true; @@ -208,7 +208,7 @@ private void ManualXY_ValueChanged(object sender, EventArgs e) private void MaxManualXY_ValueChanged(object sender, EventArgs e) => AnalogStick.SetUserRange((int) MaxXNumeric.Value, (int) MaxYNumeric.Value); - private void PolarNumeric_Changed(object sender, EventArgs e) + private void PolarNumeric_Changed(object? sender, EventArgs e) { if (_updatingFromAnalog || _updatingFromXY) return; _updatingFromPolar = true; diff --git a/src/BizHawk.Common/Extensions/CollectionExtensions.cs b/src/BizHawk.Common/Extensions/CollectionExtensions.cs index 90c2696aaed..f15c94e7144 100644 --- a/src/BizHawk.Common/Extensions/CollectionExtensions.cs +++ b/src/BizHawk.Common/Extensions/CollectionExtensions.cs @@ -145,7 +145,7 @@ public static bool CountIsExactly(this IEnumerable collection, int n) ? countable.Count == n : collection.Take(n + 1).Count() == n; -#if !NET6_0 +#if !NET6_0_OR_GREATER /// /// Returns the value at . /// If the key is not present, returns default(TValue). @@ -188,7 +188,7 @@ public static TValue GetValueOrPutNew(this IDictionary public static TValue GetValueOrPutNew1(this IDictionary dictionary, TKey key) - => dictionary.GetValueOrPut(key, static k => (TValue) Activator.CreateInstance(typeof(TValue), k)); + => dictionary.GetValueOrPut(key, static k => (TValue) Activator.CreateInstance(typeof(TValue), k)!); /// /// @@ -212,6 +212,7 @@ public static int IndexOf(this IReadOnlyList list, T elem) return null; } +#if !NET7_0_OR_GREATER /// shorthand for this.OrderBy(static e => e), backported from .NET 7 public static IOrderedEnumerable Order(this IEnumerable source) where T : IComparable @@ -221,6 +222,7 @@ public static IOrderedEnumerable Order(this IEnumerable source) public static IOrderedEnumerable OrderDescending(this IEnumerable source) where T : IComparable => source.OrderByDescending(ReturnSelf); +#endif /// /// @@ -268,9 +270,11 @@ public static bool ReversedSequenceEqual(this ReadOnlySpan a, ReadOnlySpan return true; } +#if !NET8_0_OR_GREATER /// shallow clone public static Dictionary ToDictionary(this IEnumerable> list) => list.ToDictionary(static kvp => kvp.Key, static kvp => kvp.Value); +#endif public static bool IsSortedAsc(this IReadOnlyList list) where T : IComparable diff --git a/src/BizHawk.Common/FFmpegService.cs b/src/BizHawk.Common/FFmpegService.cs index 87e0568e655..109c11ce5ee 100644 --- a/src/BizHawk.Common/FFmpegService.cs +++ b/src/BizHawk.Common/FFmpegService.cs @@ -30,7 +30,7 @@ public class AudioQueryResult private static string[] Escape(IEnumerable args) { - return args.Select(s => s.Contains(" ") ? $"\"{s}\"" : s).ToArray(); + return args.Select(s => s.Contains(' ') ? $"\"{s}\"" : s).ToArray(); } //note: accepts . or : in the stream stream/substream separator in the stream ID format, since that changed at some point in FFMPEG history diff --git a/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs b/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs index 43a8a73687c..328549e1ec5 100644 --- a/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs +++ b/src/BizHawk.Common/MemoryBlock/MemoryViewStream.cs @@ -60,7 +60,7 @@ public override void Flush() private byte* CurrentPointer() => (byte*)Z.SS(_ptr + _pos); -#if NET6_0 +#if NET6_0_OR_GREATER public override int Read(Span buffer) #else public int Read(Span buffer) @@ -110,7 +110,7 @@ public override long Seek(long offset, SeekOrigin origin) public override void SetLength(long value) => throw new IOException(); -#if NET6_0 +#if NET6_0_OR_GREATER public override void Write(ReadOnlySpan buffer) #else public void Write(ReadOnlySpan buffer) diff --git a/src/BizHawk.Common/PropertyGridConverters/ConstrainedFloatConverter.cs b/src/BizHawk.Common/PropertyGridConverters/ConstrainedFloatConverter.cs index 9b7f2ceeb69..1faee04eeb6 100644 --- a/src/BizHawk.Common/PropertyGridConverters/ConstrainedFloatConverter.cs +++ b/src/BizHawk.Common/PropertyGridConverters/ConstrainedFloatConverter.cs @@ -17,7 +17,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext? context, Type source return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); } - public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object? value) + public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) { var range = (RangeAttribute)context!.Instance .GetType() diff --git a/src/BizHawk.Common/PropertyGridConverters/ConstrainedIntConverter.cs b/src/BizHawk.Common/PropertyGridConverters/ConstrainedIntConverter.cs index 64ec3dd30e1..2a296e91bc5 100644 --- a/src/BizHawk.Common/PropertyGridConverters/ConstrainedIntConverter.cs +++ b/src/BizHawk.Common/PropertyGridConverters/ConstrainedIntConverter.cs @@ -17,7 +17,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext? context, Type source return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); } - public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object? value) + public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) { var range = (RangeAttribute)context!.Instance .GetType() diff --git a/src/BizHawk.Common/PropertyGridConverters/ConstrainedStringConverter.cs b/src/BizHawk.Common/PropertyGridConverters/ConstrainedStringConverter.cs index 3425fa8d365..62328ce620f 100644 --- a/src/BizHawk.Common/PropertyGridConverters/ConstrainedStringConverter.cs +++ b/src/BizHawk.Common/PropertyGridConverters/ConstrainedStringConverter.cs @@ -17,7 +17,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext? context, Type source return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); } - public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object? value) + public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) { var maxLength = (MaxLengthAttribute)context!.Instance .GetType() @@ -32,7 +32,7 @@ public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? throw new FormatException($"{context.PropertyDescriptor.Name} can not be null"); } - return value.ToString(); + return value.ToString()!; } } } diff --git a/src/BizHawk.Common/PropertyGridConverters/DescribableEnumConverter.cs b/src/BizHawk.Common/PropertyGridConverters/DescribableEnumConverter.cs index ff062114993..4af54d13a4b 100644 --- a/src/BizHawk.Common/PropertyGridConverters/DescribableEnumConverter.cs +++ b/src/BizHawk.Common/PropertyGridConverters/DescribableEnumConverter.cs @@ -40,11 +40,11 @@ public override object ConvertTo(ITypeDescriptorContext? context, CultureInfo? c if (fieldInfo != null) { var found = fieldInfo.GetCustomAttribute(typeof(DisplayAttribute)); - if (found is DisplayAttribute da) return da.Name; + if (found is DisplayAttribute da) return da.Name!; } } - return value.ToString(); + return value.ToString()!; } public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext? context) => new( diff --git a/src/BizHawk.Common/Serializer.cs b/src/BizHawk.Common/Serializer.cs index 9190eb916a0..c1057e0b7b9 100644 --- a/src/BizHawk.Common/Serializer.cs +++ b/src/BizHawk.Common/Serializer.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Globalization; using System.IO; - +using System.Text.RegularExpressions; using BizHawk.Common.IOExtensions; using BizHawk.Common.BufferExtensions; diff --git a/src/BizHawk.Common/Util.cs b/src/BizHawk.Common/Util.cs index 94670ee7c51..2b647c32c50 100644 --- a/src/BizHawk.Common/Util.cs +++ b/src/BizHawk.Common/Util.cs @@ -81,16 +81,16 @@ public static bool DictionaryEqual(IDictionary a, ID return a.All(kvp => b.TryGetValue(kvp.Key, out var bVal) && comparer.Equals(kvp.Value, bVal)); } -#if NET6_0 - public static string DescribeIsNull(T? obj, [CallerArgumentExpression("obj")] string? expr = default) +#if NET6_0_OR_GREATER + public static string DescribeIsNull(T? obj, [CallerArgumentExpression(nameof(obj))] string? expr = default) #else public static string DescribeIsNull(T? obj, string expr) #endif where T : class => $"{expr} is {(obj is null ? "null" : "not null")}"; -#if NET6_0 - public static string DescribeIsNullValT(T? boxed, [CallerArgumentExpression("boxed")] string? expr = default) +#if NET6_0_OR_GREATER + public static string DescribeIsNullValT(T? boxed, [CallerArgumentExpression(nameof(boxed))] string? expr = default) #else public static string DescribeIsNullValT(T? boxed, string expr) #endif @@ -122,7 +122,7 @@ public static IEnumerable GetTypesWithoutLoadErrors(this Assembly assembly } catch (ReflectionTypeLoadException e) { - return e.Types.Where(t => t != null); + return e.Types.Where(t => t != null)!; } } diff --git a/src/BizHawk.Common/checksums/MD5Checksum.cs b/src/BizHawk.Common/checksums/MD5Checksum.cs index d13f2aa5f57..1db0f6791b2 100644 --- a/src/BizHawk.Common/checksums/MD5Checksum.cs +++ b/src/BizHawk.Common/checksums/MD5Checksum.cs @@ -19,7 +19,7 @@ public static class MD5Checksum public /*static readonly*/const string EmptyFile = "D41D8CD98F00B204E9800998ECF8427E"; -#if NET6_0 +#if NET6_0_OR_GREATER public static byte[] Compute(ReadOnlySpan data) => MD5.HashData(data); #else diff --git a/src/BizHawk.Common/checksums/SHA1Checksum.cs b/src/BizHawk.Common/checksums/SHA1Checksum.cs index 00920f3549e..cfe424d8b1a 100644 --- a/src/BizHawk.Common/checksums/SHA1Checksum.cs +++ b/src/BizHawk.Common/checksums/SHA1Checksum.cs @@ -25,7 +25,7 @@ public static class SHA1Checksum public /*static readonly*/const string Zero = "0000000000000000000000000000000000000000"; -#if NET6_0 +#if NET6_0_OR_GREATER public static byte[] Compute(ReadOnlySpan data) => SHA1.HashData(data); diff --git a/src/BizHawk.Common/checksums/SHA256Checksum.cs b/src/BizHawk.Common/checksums/SHA256Checksum.cs index f27d9b53ff7..1c48bfde8f2 100644 --- a/src/BizHawk.Common/checksums/SHA256Checksum.cs +++ b/src/BizHawk.Common/checksums/SHA256Checksum.cs @@ -19,7 +19,7 @@ public static class SHA256Checksum public /*static readonly*/const string EmptyFile = "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"; -#if NET6_0 +#if NET6_0_OR_GREATER public static byte[] Compute(ReadOnlySpan data) => SHA256.HashData(data); #else diff --git a/src/BizHawk.Emulation.Common/Database/FirmwareID.cs b/src/BizHawk.Emulation.Common/Database/FirmwareID.cs index 70173dc9c45..79a849ced92 100644 --- a/src/BizHawk.Emulation.Common/Database/FirmwareID.cs +++ b/src/BizHawk.Emulation.Common/Database/FirmwareID.cs @@ -28,7 +28,7 @@ static bool IsAllowedCharacter(char c) Firmware = firmware; } - public override bool Equals(object obj) => obj is FirmwareID other + public override bool Equals(object? obj) => obj is FirmwareID other && other.Firmware == Firmware && other.System == System; public override int GetHashCode() => (System, Firmware).GetHashCode(); diff --git a/src/BizHawk.Emulation.Common/VSystemID.cs b/src/BizHawk.Emulation.Common/VSystemID.cs index 86a3c6dd767..730145dfe33 100644 --- a/src/BizHawk.Emulation.Common/VSystemID.cs +++ b/src/BizHawk.Emulation.Common/VSystemID.cs @@ -78,7 +78,7 @@ public static class Raw private static List AllSysIDs => _allSysIDs ??= typeof(Raw).GetFields(BindingFlags.Public | BindingFlags.Static) - .Select(x => (string) x.GetRawConstantValue()) + .Select(x => (string) x.GetRawConstantValue()!) .Order().ToList(); /// iff it's in the valid list, else From 6b3d41c66a901753931efda3a22d69b3569b336a Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Mon, 5 Jun 2023 19:30:56 +0200 Subject: [PATCH 3/6] more warning fixes --- .../rewind/ZeldaWinder.cs | 8 ++++++++ .../rewind/ZwinderBuffer.cs | 18 +++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/BizHawk.Client.Common/rewind/ZeldaWinder.cs b/src/BizHawk.Client.Common/rewind/ZeldaWinder.cs index af6b8db8b24..6d6d7711b01 100644 --- a/src/BizHawk.Client.Common/rewind/ZeldaWinder.cs +++ b/src/BizHawk.Client.Common/rewind/ZeldaWinder.cs @@ -291,7 +291,11 @@ private void MaybeResize(int requestedSize) _dest = replacement; } } +#if NET6_0_OR_GREATER + public override void Write(ReadOnlySpan buffer) +#else public void Write(ReadOnlySpan buffer) +#endif { var requestedSize = _position + buffer.Length; MaybeResize(requestedSize); @@ -305,7 +309,11 @@ public override void WriteByte(byte value) _dest[_position] = value; _position = requestedSize; } +#if NET6_0_OR_GREATER + public override int Read(Span buffer) => throw new IOException(); +#else public int Read(Span buffer) => throw new IOException(); +#endif } } } diff --git a/src/BizHawk.Client.Common/rewind/ZwinderBuffer.cs b/src/BizHawk.Client.Common/rewind/ZwinderBuffer.cs index 8ac7c1f822c..c3bab2900d5 100644 --- a/src/BizHawk.Client.Common/rewind/ZwinderBuffer.cs +++ b/src/BizHawk.Client.Common/rewind/ZwinderBuffer.cs @@ -142,7 +142,7 @@ private int ComputeIdealRewindInterval() { return 1; // shrug } - + if (_fixedRewindInterval) { return _targetRewindInterval; @@ -438,14 +438,22 @@ public override void Flush() {} public override int Read(byte[] buffer, int offset, int count) => throw new IOException(); public override long Seek(long offset, SeekOrigin origin) => throw new IOException(); public override void SetLength(long value) => throw new IOException(); +#if NET6_0_OR_GREATER + public override int Read(Span buffer) => throw new IOException(); +#else public int Read(Span buffer) => throw new IOException(); +#endif public override void Write(byte[] buffer, int offset, int count) { Write(new ReadOnlySpan(buffer, offset, count)); } +#if NET6_0_OR_GREATER + public override void Write(ReadOnlySpan buffer) +#else public void Write(ReadOnlySpan buffer) +#endif { long requestedSize = _position + buffer.Length; while (requestedSize > _notifySize) @@ -521,7 +529,11 @@ public override int Read(byte[] buffer, int offset, int count) return Read(new Span(buffer, offset, count)); } +#if NET6_0_OR_GREATER + public override int Read(Span buffer) +#else public int Read(Span buffer) +#endif { long n = Math.Min(_size - _position, buffer.Length); int ret = (int)n; @@ -572,7 +584,11 @@ public override int ReadByte() public override void SetLength(long value) => throw new IOException(); public override void Write(byte[] buffer, int offset, int count) => throw new IOException(); +#if NET6_0_OR_GREATER + public override void Write(ReadOnlySpan buffer) => throw new IOException(); +#else public void Write(ReadOnlySpan buffer) => throw new IOException(); +#endif } } } From 0ebe32425beb0398072886f19fa8338891d42ce4 Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Sat, 22 Jul 2023 14:47:16 -0700 Subject: [PATCH 4/6] set EnableWindowsTargeting to allow build on linux --- .../BizHawk.Bizware.Graphics.Controls.csproj | 1 + src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj | 1 + src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj | 1 + src/BizHawk.WinForms.Controls/BizHawk.WinForms.Controls.csproj | 1 + 4 files changed, 4 insertions(+) diff --git a/src/BizHawk.Bizware.Graphics.Controls/BizHawk.Bizware.Graphics.Controls.csproj b/src/BizHawk.Bizware.Graphics.Controls/BizHawk.Bizware.Graphics.Controls.csproj index 9c92330dd40..14a4c2ae3ed 100644 --- a/src/BizHawk.Bizware.Graphics.Controls/BizHawk.Bizware.Graphics.Controls.csproj +++ b/src/BizHawk.Bizware.Graphics.Controls/BizHawk.Bizware.Graphics.Controls.csproj @@ -7,6 +7,7 @@ true disable true + true diff --git a/src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj b/src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj index 3246a268519..3cad930ed6d 100644 --- a/src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj +++ b/src/BizHawk.Client.DiscoHawk/BizHawk.Client.DiscoHawk.csproj @@ -7,6 +7,7 @@ discohawk.ico disable true + true diff --git a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 98387b9e5a3..11295d77c93 100755 --- a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -10,6 +10,7 @@ disable None true + true diff --git a/src/BizHawk.WinForms.Controls/BizHawk.WinForms.Controls.csproj b/src/BizHawk.WinForms.Controls/BizHawk.WinForms.Controls.csproj index 796d1e52ca4..1d7f4938307 100644 --- a/src/BizHawk.WinForms.Controls/BizHawk.WinForms.Controls.csproj +++ b/src/BizHawk.WinForms.Controls/BizHawk.WinForms.Controls.csproj @@ -5,6 +5,7 @@ true + true From 36d9680ffdc4673af36e2d4427ed5bcf8c84bcfd Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:21:09 +0100 Subject: [PATCH 5/6] some warning fixes idk --- src/BizHawk.Client.Common/BizHawk.Client.Common.csproj | 2 +- src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs | 2 ++ src/BizHawk.Common/OSTailoredCode.cs | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj index 55ee645a671..9372efb4452 100644 --- a/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj +++ b/src/BizHawk.Client.Common/BizHawk.Client.Common.csproj @@ -1,6 +1,6 @@  - netstandard2.0;net8.0 + netstandard2.0;net8.0-windows diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index bd1bdcddcf6..43e314ad53f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -9,7 +9,9 @@ using BizHawk.Client.Common; using BizHawk.Common; using BizHawk.Common.CollectionExtensions; +#if !NET6_0_OR_GREATER using BizHawk.Common.StringExtensions; +#endif namespace BizHawk.Client.EmuHawk { diff --git a/src/BizHawk.Common/OSTailoredCode.cs b/src/BizHawk.Common/OSTailoredCode.cs index 5c965d21c1f..8a302ffd324 100644 --- a/src/BizHawk.Common/OSTailoredCode.cs +++ b/src/BizHawk.Common/OSTailoredCode.cs @@ -2,7 +2,9 @@ using System.Diagnostics; using System.Runtime.InteropServices; +#if !NET6_0_OR_GREATER using BizHawk.Common.StringExtensions; +#endif using static BizHawk.Common.LoaderApiImports; From a96c5573480b08c350345e24fd1b7c4f6cb82ad4 Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Wed, 14 Feb 2024 22:51:42 +0100 Subject: [PATCH 6/6] apparently this also errors now --- .../Computers/AmstradCPC/Hardware/Display/AmstradGateArray.cs | 2 +- .../Computers/AmstradCPC/Machine/CPC464/CPC464.Port.cs | 2 +- .../Computers/AmstradCPC/Machine/CPC6128/CPC6128.Port.cs | 2 +- .../Computers/AmstradCPC/Machine/GateArrayBase.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/AmstradGateArray.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/AmstradGateArray.cs index 7384e398f03..4190f4dfcd7 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/AmstradGateArray.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/Display/AmstradGateArray.cs @@ -1145,7 +1145,7 @@ public bool ReadPort(ushort port, ref int result) public bool WritePort(ushort port, int result) { BitArray portBits = new BitArray(BitConverter.GetBytes(port)); - BitArray dataBits = new BitArray(BitConverter.GetBytes((byte)result)); + BitArray dataBits = new BitArray(new[] {(byte)result}); byte portUpper = (byte)(port >> 8); byte portLower = (byte)(port & 0xff); diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPC464/CPC464.Port.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPC464/CPC464.Port.cs index 9d2d10e321f..b6abc8b0a56 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPC464/CPC464.Port.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPC464/CPC464.Port.cs @@ -55,7 +55,7 @@ public override byte ReadPort(ushort port) public override void WritePort(ushort port, byte value) { BitArray portBits = new BitArray(BitConverter.GetBytes(port)); - BitArray dataBits = new BitArray(BitConverter.GetBytes(value)); + BitArray dataBits = new BitArray(new[] {value}); byte portUpper = (byte)(port >> 8); byte portLower = (byte)(port & 0xff); diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPC6128/CPC6128.Port.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPC6128/CPC6128.Port.cs index 6cd4c5706c9..6453f7f5288 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPC6128/CPC6128.Port.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/CPC6128/CPC6128.Port.cs @@ -69,7 +69,7 @@ public override byte ReadPort(ushort port) public override void WritePort(ushort port, byte value) { BitArray portBits = new BitArray(BitConverter.GetBytes(port)); - BitArray dataBits = new BitArray(BitConverter.GetBytes(value)); + BitArray dataBits = new BitArray(new[] {value}); byte portUpper = (byte)(port >> 8); byte portLower = (byte)(port & 0xff); diff --git a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/GateArrayBase.cs b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/GateArrayBase.cs index 71cf090839d..07acd9eafcb 100644 --- a/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/GateArrayBase.cs +++ b/src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Machine/GateArrayBase.cs @@ -362,7 +362,7 @@ public bool ReadPort(ushort port, ref int result) public bool WritePort(ushort port, int result) { BitArray portBits = new BitArray(BitConverter.GetBytes(port)); - BitArray dataBits = new BitArray(BitConverter.GetBytes((byte)result)); + BitArray dataBits = new BitArray(new[] {(byte)result}); // The gate array responds to port 0x7F bool accessed = !portBits[15];