@@ -42,18 +42,20 @@ public DSDA(CoreLoadParameters<DoomSettings, DoomSyncSettings> lp)
4242 foreach ( var wadFile in _wadFiles )
4343 {
4444 bool recognized = false ;
45-
45+ #pragma warning disable CS0618
46+ var filePath = wadFile . RomPath ;
47+ #pragma warning restore CS0618
4648 if ( wadFile . RomData is [ ( byte ) 'I' , ( byte ) 'W' , ( byte ) 'A' , ( byte ) 'D' , .. ] )
4749 {
4850 // Check not more than one IWAD is provided
4951 if ( foundIWAD )
5052 {
5153 throw new ArgumentException (
52- $ "More than one IWAD provided. Trying to load '{ wadFile . RomPath } ', but IWAD '{ _iwadName } ' was already provided",
54+ $ "More than one IWAD provided. Trying to load '{ filePath } ', but IWAD '{ _iwadName } ' was already provided",
5355 paramName : nameof ( lp ) ) ;
5456 }
5557
56- _iwadName = wadFile . RomPath ;
58+ _iwadName = filePath ;
5759 _iwadData = wadFile . RomData ;
5860 foundIWAD = true ;
5961 recognized = true ;
@@ -62,7 +64,7 @@ public DSDA(CoreLoadParameters<DoomSettings, DoomSyncSettings> lp)
6264 {
6365 if ( _fakePwads . Contains ( GetFullName ( wadFile ) . ToLowerInvariant ( ) ) )
6466 {
65- _iwadName = wadFile . RomPath ;
67+ _iwadName = filePath ;
6668 _iwadData = wadFile . RomData ;
6769 foundIWAD = true ;
6870 }
@@ -77,7 +79,7 @@ public DSDA(CoreLoadParameters<DoomSettings, DoomSyncSettings> lp)
7779 if ( ! recognized )
7880 {
7981 throw new ArgumentException (
80- $ "Unrecognized WAD provided: '{ wadFile . RomPath } ' has non-standard header.",
82+ $ "Unrecognized WAD provided: '{ filePath } ' has non-standard header.",
8183 paramName : nameof ( lp ) ) ;
8284 }
8385 }
@@ -206,11 +208,14 @@ public DSDA(CoreLoadParameters<DoomSettings, DoomSyncSettings> lp)
206208 // Adding PWAD file(s)
207209 foreach ( var wadFile in _pwadFiles )
208210 {
209- _gameMode = _core . dsda_add_wad_file ( wadFile . RomPath , wadFile . RomData . Length , _loadCallback ) ;
211+ #pragma warning disable CS0618
212+ var filePath = wadFile . RomPath ;
213+ #pragma warning restore CS0618
214+ _gameMode = _core . dsda_add_wad_file ( filePath , wadFile . RomData . Length , _loadCallback ) ;
210215 if ( _gameMode is LibDSDA . GameMode . Fail )
211216 {
212217 throw new ArgumentException (
213- $ "Could not load PWAD file: '{ wadFile . RomPath } '",
218+ $ "Could not load PWAD file: '{ filePath } '",
214219 paramName : nameof ( lp ) ) ;
215220 }
216221 }
@@ -332,7 +337,10 @@ private void ConditionalArg(bool condition, string setting)
332337 }
333338 }
334339
335- private string GetFullName ( IRomAsset rom ) => Path . GetFileName ( rom . RomPath . SubstringAfter ( '|' ) ) ;
340+ private string GetFullName ( IRomAsset rom )
341+ #pragma warning disable CS0618
342+ => Path . GetFileName ( rom . RomPath . SubstringAfter ( '|' ) ) ;
343+ #pragma warning restore CS0618
336344
337345 private static bool PlayerPresent ( DoomSyncSettings syncSettings , int port ) =>
338346 port switch
@@ -435,7 +443,9 @@ private int LoadCallback(string filename, IntPtr buffer, int maxsize)
435443
436444 foreach ( var wadFile in _wadFiles )
437445 {
446+ #pragma warning disable CS0618
438447 if ( filename == wadFile . RomPath )
448+ #pragma warning restore CS0618
439449 {
440450 if ( wadFile . FileData == null )
441451 {
0 commit comments