@@ -50,7 +50,11 @@ public sealed partial class DOSBox : WaterboxCore
5050 private int _currentCDROM = 0 ;
5151 private bool _disposed ;
5252
53- private string GetFullName ( IRomAsset rom ) => Path . GetFileName ( rom . RomPath . SubstringAfter ( '|' ) ) ;
53+ private string GetFullName ( IRomAsset rom )
54+ #pragma warning disable CS0618
55+ => Path . GetFileName ( rom . RomPath . SubstringAfter ( '|' ) ) ;
56+ #pragma warning restore CS0618
57+
5458 private string GetFullName ( IDiscAsset disk ) => Path . GetFileName ( disk . DiscData . Name . SubstringAfter ( '|' ) ) ;
5559
5660 // CD Handling logic
@@ -81,7 +85,10 @@ public DOSBox(CoreLoadParameters<object, SyncSettings> lp)
8185 // Parsing rom files
8286 foreach ( var file in _romAssets )
8387 {
84- switch ( Path . GetExtension ( file . RomPath ) )
88+ #pragma warning disable CS0618
89+ var filePath = file . RomPath ;
90+ #pragma warning restore CS0618
91+ switch ( Path . GetExtension ( filePath ) )
8592 {
8693 case ".ima" or ".img" or ".xdf" or ".dmf" or ".fdd" or ".fdi" or ".nfd" or ".d88" :
8794 _floppyDiskImageFiles . Add ( file ) ;
@@ -96,7 +103,7 @@ public DOSBox(CoreLoadParameters<object, SyncSettings> lp)
96103 break ;
97104
98105 default :
99- throw new Exception ( $ "Unrecognized input file provided: ' { file . RomPath } ' ") ;
106+ throw new Exception ( $ "Provided file was not recognised: \" { filePath } \" ") ;
100107 }
101108 }
102109
@@ -209,7 +216,9 @@ public DOSBox(CoreLoadParameters<object, SyncSettings> lp)
209216 string floppyMountLine = "imgmount a " ;
210217 foreach ( var file in _floppyDiskImageFiles )
211218 {
219+ #pragma warning disable CS0618
212220 string floppyNewName = $ "{ FileNames . FD } { _floppyDiskCount } { Path . GetExtension ( file . RomPath ) } ";
221+ #pragma warning restore CS0618
213222 _exe . AddReadonlyFile ( file . FileData , floppyNewName ) ;
214223 floppyMountLine += floppyNewName + " " ;
215224 _floppyDiskCount ++ ;
0 commit comments